Skip site navigation (1) Skip section navigation (2)

Re: pg_ctl is fragile

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: pg_ctl is fragile
Date: 2002-11-07 22:14:43
Message-ID: 29593.1036707283@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Neil Conway <neilc(at)samurai(dot)com> writes:
> After an unclean shutdown (e.g. a kernel crash), pg_ctl isn't smart
> enough to realize that it won't be able to successfully shut down the
> postmaster:

> $ pg_ctl -D /pgsql/data stop
> /pgsql/bin/pg_ctl: line 269: kill: (2039) - No such process
> waiting for postmaster to shut down................................................................ failed
> pg_ctl: postmaster does not shut down

> We should probably check the exit code produced by kill(1).

Doesn't seem like kill's exit code is going to tell you enough.
If you got, say, "Permission denied" rather than "No such process",
you shouldn't report that the postmaster isn't running.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Neil ConwayDate: 2002-11-07 22:46:22
Subject: Re: pg_ctl is fragile
Previous:From: Neil ConwayDate: 2002-11-07 21:56:35
Subject: Re: Cannot assign ROWTYPE, RECORD variables in PL/pgSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group