Re: fix bgworkers in EXEC_BACKEND
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: Simon Riggs <simon@2ndQuadrant.com>, Heikki Linnakangas <hlinnakangas@vmware.com>, Alvaro Herrera <alvherre@2ndQuadrant.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2012-12-27T19:08:11Z
Lists: pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes: > Simon, > * Simon Riggs (simon@2ndQuadrant.com) wrote: >> I admire your forward thinking on that; yes, that could cause >> problems. But even then, we would be admitting that nobody now gets a >> valid value of MaxBackends, which sounds like it might be a problem in >> itself. > I agree that the current implementation could lead to problems/confusion > for contrib module authors, if they're doing something with MaxBackends. This is more or less a necessary consequence of the fact that _init functions are now allowed to add background workers. If there is any code today that expects MaxBackends to be correct at preload_shared_libraries time, it's already been broken irretrievably by the bgworkers patch; and we'd be well advised to make that breakage obvious not subtle. So I'm +1 for Heikki's proposal as well. regards, tom lane