Discussion:
pg_ctl stop -m fast
(too old to reply)
Lee Wu
2004-10-28 16:38:28 UTC
Permalink
Hi,



One of our customers complains about

pg_ctl stop -m fast

could not shutdown PG server though we cannot reproduce the same problem
here.



They claim only "-m immediate" can take PG down after 10 minutes of
issuing "-m fast".



The PG version is 7.3.2.



What might prevent "-m fast" to shutdown PG (long transaction, etc.)?

What should I do to help the customer solve this issue?



Thanks,
Tom Lane
2004-10-28 17:10:20 UTC
Permalink
Post by Lee Wu
They claim only "-m immediate" can take PG down after 10 minutes of
issuing "-m fast".
The PG version is 7.3.2.
This is a known bug in 7.3.2 and before, if there is an idle backend
that hasn't received any user query since it got a SIGUSR2 interrupt.

2003-02-17 21:53 tgl

* src/backend/commands/async.c (REL7_3_STABLE): Async_NotifyHandler
must save and restore ImmediateInterruptOK. Fixes known problem
with failure to respond to 'pg_ctl stop -m fast', and probable
problems if SIGINT or SIGTERM arrives while processing a SIGUSR2
interrupt that arrived while waiting for a new client query.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ***@postgresql.org)
Johnson, Heather
2004-10-28 17:24:25 UTC
Permalink
I've seen this happen. I think it happens because we have a Postgres database that is serving multiple webservers getting a high level of traffic. If you try to shut down the database while the webservers are still initiating connections to it, pg_ctl has trouble shutting it down, even with -m fast. But if you can stop the webservers from initiating new connections before you try and shut down the db, pg_ctl works fine.

Heather Johnson
Senior Database Programmer
New York Post

-----Original Message-----
From: pgsql-admin-***@postgresql.org
To: pgsql-***@postgresql.org
Sent: 10/28/2004 12:38 PM
Subject: [ADMIN] pg_ctl stop -m fast

Hi,



One of our customers complains about

pg_ctl stop -m fast

could not shutdown PG server though we cannot reproduce the same problem
here.



They claim only "-m immediate" can take PG down after 10 minutes of
issuing "-m fast".



The PG version is 7.3.2.



What might prevent "-m fast" to shutdown PG (long transaction, etc.)?

What should I do to help the customer solve this issue?



Thanks,
Lee Wu
2004-10-29 16:35:10 UTC
Permalink
Thanks Tom.

May I ask in which version this bug is fixed?

-----Original Message-----
From: Tom Lane [mailto:***@sss.pgh.pa.us]
Sent: Thursday, October 28, 2004 11:10 AM
To: Lee Wu
Cc: pgsql-***@postgresql.org
Subject: Re: [ADMIN] pg_ctl stop -m fast
Post by Lee Wu
They claim only "-m immediate" can take PG down after 10 minutes of
issuing "-m fast".
The PG version is 7.3.2.
This is a known bug in 7.3.2 and before, if there is an idle backend
that hasn't received any user query since it got a SIGUSR2 interrupt.

2003-02-17 21:53 tgl

* src/backend/commands/async.c (REL7_3_STABLE):
Async_NotifyHandler
must save and restore ImmediateInterruptOK. Fixes known problem
with failure to respond to 'pg_ctl stop -m fast', and probable
problems if SIGINT or SIGTERM arrives while processing a SIGUSR2
interrupt that arrived while waiting for a new client query.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Loading...