Thread: pg.conf re-reading in signal handler or at next return to main loop?
Hi, src/backend/utils/misc/README says " If SIGHUP is received, the GUC code rereads the postgresql.conf configuration file (this does not happen in the signal handler, but at next return to main loop; note that it can be executed while within a transaction). " SIGHUP_handler() calls ProcessConfigFile() which calls ParseConfigFile() which reads postgresql.conf. For me that means that postgresql.conf in read in the signal handler, which contradicts the claim in the README. Where's my error? Markus Bertheau
"Markus Bertheau" <mbertheau.pg@googlemail.com> writes: > SIGHUP_handler() calls ProcessConfigFile() which calls > ParseConfigFile() which reads postgresql.conf. > For me that means that postgresql.conf in read in the signal handler, > which contradicts the claim in the README. Where's my error? The comment is referring to the control flow in a backend; you're looking at the postmaster's sighup handler, which is different. regards, tom lane
Re: pg.conf re-reading in signal handler or at next return to main loop?
From
"Markus Bertheau"
Date:
2006/3/6, Tom Lane <tgl@sss.pgh.pa.us>: > > The comment is referring to the control flow in a backend; you're > looking at the postmaster's sighup handler, which is different. Then the following comment patch is appropriate, afaics. Markus Bertheau
Attachment
Code comment patch applied. Thanks. --------------------------------------------------------------------------- Markus Bertheau wrote: > 2006/3/6, Tom Lane <tgl@sss.pgh.pa.us>: > > > > The comment is referring to the control flow in a backend; you're > > looking at the postmaster's sighup handler, which is different. > > Then the following comment patch is appropriate, afaics. > > Markus Bertheau [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend -- Bruce Momjian http://candle.pha.pa.us SRA OSS, Inc. http://www.sraoss.com + If your life is a hard drive, Christ can be your backup. +
Bruce Momjian <pgman@candle.pha.pa.us> writes: > Code comment patch applied. Thanks. The comment was in fact correct as it stood, though in different ways for the postmaster and backend --- in the postmaster it alludes to the fact that we only enable signals at one point in the postmaster loop. regards, tom lane
Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > Code comment patch applied. Thanks. > > The comment was in fact correct as it stood, though in different ways > for the postmaster and backend --- in the postmaster it alludes to the > fact that we only enable signals at one point in the postmaster loop. OK, patch backed out. -- Bruce Momjian http://candle.pha.pa.us SRA OSS, Inc. http://www.sraoss.com + If your life is a hard drive, Christ can be your backup. +