pg_upgradecluster does not support PG_CLUSTER_CONF_ROOT

Bug #835630 reported by Dimitri John Ledkov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgresql-common (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

I have created a cluster with

env PG_CLUSTER_CONF_ROOT=$HOME/.local/etc/postgresql pg_createcluster 8.4 main -d $HOME/.local/var/postgresql -l $HOME/local/var/log/postgresql
env PG_CLUSTER_CONF_ROOT=$HOME/.local/etc/postgresql pg_ctlcluster 8.4 main start

And I cannot upgrade it using pg_upgradecluster, it has hard coded /etc/postgresql somewhere.

(I have cluster in home directory because home partition is encrypted with ecryptfs)

summary: - pg_upgradecluster does not support
- PG_CLUSTER_CONF_ROOT=/home/dle/.local/etc/postgresql
+ pg_upgradecluster does not support PG_CLUSTER_CONF_ROOT
Martin Pitt (pitti)
description: updated
Changed in postgresql-common (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

It seems there's some more things wrong when using PG_CLUSTER_CONF_ROOT: psql tries to search the socket in /var/run/, pg_dropcluster also fails. I'm currently writing test cases which exercise all the tools to uncover these bugs, and will then fix them. Thanks for reporting!

Changed in postgresql-common (Ubuntu):
status: Triaged → In Progress
importance: Low → Medium
Revision history for this message
Martin Pitt (pitti) wrote :

All fixed in current bzr trunk.

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

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

---------------
postgresql-common (125) unstable; urgency=low

  * Add debian/backport-ppa: Script to generate and upload backport packages
    to my Ubuntu PPA. Only for personal use.
  * Add t/160_alternate_confroot.t: Test creation, operation, upgrading, and
    removal of clusters as user nobody using $PG_CLUSTER_CONF_ROOT. This
    reproduces LP#835630 and other bugs.
  * PgCommon.pm: If $PG_CLUSTER_CONF_ROOT is set, untaint it.
  * pg_upgradecluster: Don't hardcode /etc/postgresql/, use
    $PgCommon::confroot to respect $PG_CLUSTER_CONF_ROOT. (LP: #835630)
  * pg_upgradecluster: Add --logfile option to specify a custom log file for
    the upgraded cluster. Necessary if you want to run this on
    per-user clusters and can't write into /var/log/postgresql/.
  * pg_ctlcluster: When starting as root for >= 9.1, adjust the OOM killer
    protection to -16, so that the postmaster does not get OOM-killed so
    easily (as it appears to claim all the shared memory). 9.1.1-3 and later
    resets oomadj of child processes to 0, so that the client backends can
    still get OOM-killed. Add tests to t/020_create_sql_remove.t.
    (LP: #854590)
  * debian/control: Add Breaks: to postgresql-9.1 versios before 9.1.1-3, as
    they do not reset oomadj for child processes. This is a precaution to
    avoid running all the client backends with -16 as well.
  * Add t/170_extensions.t: Check that all shipped extensions install and
    remove.
  * Add t/180_ecpg.t: Check that ecpg works. In t/001_packages.t, check that
    libecpg-dev is installed.

 -- Martin Pitt <email address hidden> Thu, 20 Oct 2011 12:17:30 +0200

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.