dbTalk Databases Forums  

[BUGS] pg_ctl inappropriately timing out?

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] pg_ctl inappropriately timing out? in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Josh Berkus
 
Posts: n/a

Default [BUGS] pg_ctl inappropriately timing out? - 06-07-2005 , 06:16 PM






Folks:

Issue: pg_ctl seems to be prematurely timing out.
Version: 8.0.3
Severity: Annoying
Description:
1. Do an immense load on a database, like 2.5gb.
2. Right after the COPY finishes, send a pg_ctl -m fast stop to the server.
3. You will get:
pg_ctl: postmaster does not shut down

What Seems To Be Happening:
When you call pg_ctl --stop, the WAL is still writing out to the database
and postmaster won't shut down until it's done, which can take a couple
minutes. In the meantime, pg_ctl is timing out and prematurely reporting
failure.

Resolution:
Not sure, really. Is there some way for pg_ctl to intelligently detect
this situation? To set a timeout value for pg_ctl via a command-line
option?

--
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply With Quote
  #2  
Old   
Alvaro Herrera
 
Posts: n/a

Default Re: [BUGS] pg_ctl inappropriately timing out? - 06-07-2005 , 07:28 PM






On Tue, Jun 07, 2005 at 04:16:49PM -0700, Josh Berkus wrote:
Quote:
Folks:

Issue: pg_ctl seems to be prematurely timing out.
Version: 8.0.3
Severity: Annoying
Description:
1. Do an immense load on a database, like 2.5gb.
2. Right after the COPY finishes, send a pg_ctl -m fast stop to the server.
3. You will get:
pg_ctl: postmaster does not shut down

What Seems To Be Happening:
When you call pg_ctl --stop, the WAL is still writing out to the database
and postmaster won't shut down until it's done, which can take a couple
minutes. In the meantime, pg_ctl is timing out and prematurely reporting
failure.

Resolution:
Not sure, really. Is there some way for pg_ctl to intelligently detect
this situation? To set a timeout value for pg_ctl via a command-line
option?
Is there any way for pg_ctl to detect a "server is shutting down"
message? Not sure what it'd do with it though ...

--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"Escucha y olvidarás; ve y recordarás; haz y entenderás" (Confucio)

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] pg_ctl inappropriately timing out? - 06-07-2005 , 10:33 PM



Alvaro Herrera <alvherre (AT) surnet (DOT) cl> writes:
Quote:
On Tue, Jun 07, 2005 at 04:16:49PM -0700, Josh Berkus wrote:
When you call pg_ctl --stop, the WAL is still writing out to the database
and postmaster won't shut down until it's done, which can take a couple
minutes.

Is there any way for pg_ctl to detect a "server is shutting down"
message? Not sure what it'd do with it though ...
It strikes me that the server shouldn't ever get a couple minutes behind
on writing dirty buffers; this seems more like a bgwriter configuration
issue than pg_ctl's fault. Consider that in a standard Unix
configuration you will get about 20 seconds between SIGTERM and SIGKILL
when init wants to shut you down ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #4  
Old   
Josh Berkus
 
Posts: n/a

Default Re: [BUGS] pg_ctl inappropriately timing out? - 06-08-2005 , 11:27 AM



Tom,

Quote:
It strikes me that the server shouldn't ever get a couple minutes behind
on writing dirty buffers; this seems more like a bgwriter configuration
issue than pg_ctl's fault. Consider that in a standard Unix
configuration you will get about 20 seconds between SIGTERM and SIGKILL
when init wants to shut you down ...
Well, I can run an actual timer if you like. But it's definitely more than
20 seconds. And we're using the default bgwriter config, perhaps I should
set it to 0?

--
Josh Berkus
Aglio Database Solutions
San Francisco

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

http://archives.postgresql.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.