pg_ctlcluster: Create /var/log/postgresql if it does not exist

Bug #1009989 reported by martin suchanek
66
This bug affects 12 people
Affects Status Importance Assigned to Milestone
postgresql-common (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

installation process.

lsb_release -rd
Description: Ubuntu 12.04 LTS
Release: 12.04

apt-cache policy postgresql-9.1
postgresql-9.1:
  Installed: 9.1.3-2
  Candidate: 9.1.4-0ubuntu12.04
  Version table:
     9.1.4-0ubuntu12.04 0
        500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
 *** 9.1.3-2 0
        500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

expected: proper installation.
happened: failed installation

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: postgresql-9.1 9.1.4-0ubuntu12.04
ProcVersionSignature: Ubuntu 3.2.0-25.40-generic 3.2.18
Uname: Linux 3.2.0-25-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.0.1-0ubuntu9
Architecture: amd64
Date: Thu Jun 7 13:27:06 2012
ErrorMessage: subprocess new pre-removal script returned error exit status 1
SourcePackage: postgresql-9.1
Title: package postgresql-9.1 9.1.3-2 failed to install/upgrade: subprocess new pre-removal script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
martin suchanek (martin-suc) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in postgresql-9.1 (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

 * Stopping PostgreSQL 9.1 database server  * Error: Could not create log file /var/log/postgresql/postgresql-9.1-main.log

Any idea why that is? Can you please give me the output of ls -lR /var/log/postgresql ?

Changed in postgresql-9.1 (Ubuntu):
status: Confirmed → Incomplete
summary: - package postgresql-9.1 9.1.3-2 failed to install/upgrade: subprocess new
- pre-removal script returned error exit status 1
+ package postgresql-9.1 9.1.3-2 failed to install/upgrade: cannot create
+ log file
Revision history for this message
Aidsoid (aidsoid-gmail) wrote : Re: package postgresql-9.1 9.1.3-2 failed to install/upgrade: cannot create log file

Logs in tmpfs for ssd.

Martin Pitt (pitti)
summary: - package postgresql-9.1 9.1.3-2 failed to install/upgrade: cannot create
- log file
+ pg_ctlcluster: Create /var/log/postgresql if it does not exist
Changed in postgresql-9.1 (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → Low
affects: postgresql-9.1 (Ubuntu) → postgresql-common (Ubuntu)
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in bzr.

Changed in postgresql-common (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package postgresql-common - 140

---------------
postgresql-common (140) experimental; urgency=low

  [ Martin Pitt ]
  * t/001_packages.t: Also check that -contrib is installed.
  * debian/backport-ppa: Backport -common for Ubuntu 12.10.
  * PgCommon.pm: Recognize "include_if_exists" directive. (LP: #1098986)
  * pg_ctlcluster: Recreate a missing /var/log/postgresql/ if needed.
    (LP: #1009989)
  * debian/postgresql-client-common.links: Wrap pgbench with pg_wrapper.
    (LP: #1068194)

  [ Christoph Berg ]
  * testsuite: The default list of umasks to test (022 077) can be overridden
    by setting the environment variable PG_UMASKS.
  * t/003_package_checks.t: Ensure psql is linked against libedit.
  * t/005_PgCommon.t: Increase sleep time after netcat launch to 200ms.
  * t/020_create_sql_remove.t: Test process title update.
  * pg_createcluster: Allow passing of initdb arguments on the command line.
    If --auth parameters are passed, skip updating the generated pg_hba.conf
    file.
  * pg_virtualenv: Allow passing initdb arguments to pg_createcluster.
  * pg_upgradecluster: Print a helpful message when invoked on the target
    version. Problem seen on #postgresql.
  * t/030_errors.t: Adjust testsuite for this.
  * debian/supported-versions: Handle unset variables from /etc/os-release
    gracefully. Spotted by x4rlos on #postgresql.
  * pg_buildext: Set USE_PGXS=1, and srcdir (needed by plr).

 -- Christoph Berg <email address hidden> Thu, 31 Jan 2013 10:36:41 +0100

Changed in postgresql-common (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.