Thread: Postgres 7.1 RPM

Postgres 7.1 RPM

From
"Daniel Iordan"
Date:
   If you do not shut down the database correctly, with
/etc/init.d/postgresql stop (let's say you have a powercut),
when you try
/etc/init.d/postgresql start it doesn't work.
After deleting the file
/var/lib/pgsql/data/postmaster.pid everything is okay.

I've tested this on RedHat 7.0.

Daniel Iordan




Re: Postgres 7.1 RPM

From
Lamar Owen
Date:
Daniel Iordan wrote:
>
>    If you do not shut down the database correctly, with
> /etc/init.d/postgresql stop (let's say you have a powercut),

On a powercut, you have other problems.  A system shutdown will execute
the stop script if the right sysv initscript tools are used to insert
the postgresql script into the boot chain. On RH 7, use chkconfig to do
this.

> when you try
> /etc/init.d/postgresql start it doesn't work.
> After deleting the file
> /var/lib/pgsql/data/postmaster.pid everything is okay.

Automatically deleting the pid file would be a bad thing.

Thanks for the report!
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

Re: Postgres 7.1 RPM

From
Tom Lane
Date:
Lamar Owen <lamar.owen@wgcr.org> writes:
> Daniel Iordan wrote:
>> If you do not shut down the database correctly, with
>> /etc/init.d/postgresql stop (let's say you have a powercut),
>> when you try
>> /etc/init.d/postgresql start it doesn't work.
>> After deleting the file
>> /var/lib/pgsql/data/postmaster.pid everything is okay.

> Automatically deleting the pid file would be a bad thing.

Something is fishy here.  The postmaster itself will probe to see if the
old postmaster is still there, and will delete the old postmaster.pid
file if not.  If this is not working then either we have a
platform-specific bug in that processing, or the startup script is
getting in the way --- does the startup script itself look for a
postmaster.pid file?

            regards, tom lane