Unix Technical Forum

SubPostmasterMain startup should be a critical section?

This is a discussion on SubPostmasterMain startup should be a critical section? within the pgsql Hackers forums, part of the PostgreSQL category; --> Now that we've isolated the reason why regression tests are failing on the Windows buildfarm members, it seems to ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 03:45 AM
Tom Lane
 
Posts: n/a
Default SubPostmasterMain startup should be a critical section?

Now that we've isolated the reason why regression tests are failing on
the Windows buildfarm members, it seems to me that there's a systemic
problem as well as the immediate bug. The problem is that guc.c is
doing an elog(ERROR) during InitializeGucOptions in postmaster children,
which ends up doing exit(0), which the postmaster interprets as
successful termination of the startup process, which is seriously wrong.
And then we get into a loop where the postmaster spawns a background
writer, the bgwriter immediately exit(0)'s for the same reason, the
postmaster respawns it, etc. This apparently is a sufficiently tight
loop to cause a Windows machine to nearly lock up (not but what "fork
bombs" aren't problems for Unixen too).

I'm thinking we should put CRITICAL_SECTION macros around the startup
sequence in SubPostmasterMain, so that an elog(ERROR) there can't look
like it's business as usual to the postmaster.

Anyone see a better/more complete solution?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:45 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com