postgresql server cannot shut down and cannot restart

Bug #172840 reported by Rick Graves
2
Affects Status Importance Assigned to Milestone
postgresql (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: postgresql

If you shut down the computer, you see a message "error PID file is invalid, please manually kill the stale server process" (maybe not an exact quote), along with Fail in red. You get exactly the same message if you try shutting down the database server or restarting the database server. I have this problem both in ubuntu 6.06 LTS and 7.10.

Revision history for this message
Rick Graves (gravesricharde) wrote : Re: [Bug 172840] postgresql server cannot shut down and cannot restart

Actually, I discovered that the problem (postgresql
server cannot shut down and cannot restart) is only a
problem with a non-default data location.

The postgresql.conf file has a data_directory value,
and if you set that to a non-default location, some
but not all of the data goes to that location. There
is also a pgdata soft link in the same directory as
the conf file, and some of the data follows that soft
link, no matter the value of data_directory in
postgresql.conf.

I would call the feature of using a non-default data
location as "broken", unless there is documentation
somewhere that I have overlooked.

I have given up on trying to use /srv/postgresql for
the data directory, and instead I am going with the
default, /var/lib/postgresql, as use of a non-default
location is not currently supported as far as I know.

Thanks,

--- Rick Graves <email address hidden> wrote:

> Public bug reported:
>
> Binary package hint: postgresql
>
> If you shut down the computer, you see a message
> "error PID file is
> invalid, please manually kill the stale server
> process" (maybe not an
> exact quote), along with Fail in red. You get
> exactly the same message
> if you try shutting down the database server or
> restarting the database
> server. I have this problem both in ubuntu 6.06 LTS
> and 7.10.
>
> ** Affects: postgresql (Ubuntu)
> Importance: Undecided
> Status: New
>
> --
> postgresql server cannot shut down and cannot
> restart
> https://bugs.launchpad.net/bugs/172840
> You received this bug notification because you are a
> direct subscriber
> of the bug.
>

Revision history for this message
Martin Pitt (pitti) wrote :

This is fixed in the more recent postgresql-common versions:

postgresql-common (80) unstable; urgency=low
  [...]
  * PgCommon.pm: Fix cluster_data_directory() to consider the data_directory
    setting in postgresql.conf, which should trump the /pgdata symbolic link.
  [...]

For your case, just either change the pgdata symbolic link, or remove it entirely, so that the data_directory setting in postgresql.conf becomes active. Non-default locations work fine, and postgresql-common has test cases to ensure that this feature does not regress.

Changed in postgresql:
status: New → Fix Released
Revision history for this message
Rick Graves (gravesricharde) wrote : Re: [Bug 172840] Re: postgresql server cannot shut down and cannot restart

Thanks,

--- Martin Pitt <email address hidden> wrote:

> This is fixed in the more recent postgresql-common
> versions:
>
> postgresql-common (80) unstable; urgency=low
> [...]
> * PgCommon.pm: Fix cluster_data_directory() to
> consider the data_directory
> setting in postgresql.conf, which should trump
> the /pgdata symbolic link.
> [...]
>
> For your case, just either change the pgdata
> symbolic link, or remove it
> entirely, so that the data_directory setting in
> postgresql.conf becomes
> active. Non-default locations work fine, and
> postgresql-common has test
> cases to ensure that this feature does not regress.
>
> ** Changed in: postgresql (Ubuntu)
> Status: New => Fix Released
>
> --
> postgresql server cannot shut down and cannot
> restart
> https://bugs.launchpad.net/bugs/172840
> You received this bug notification because you are a
> direct subscriber
> of the bug.
>

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.