On Tue, Jun 26, 2018 at 4:12 AM, Chen, Yan-Jack (NSB - CN/Hangzhou) <yan-jack.c...@nokia-sbell.com> wrote: > Hi, > Well, if you agree with do not write log in signal handling function in any > circumstance
I don't understand this sentence. > I see in many cases in postgresql signal handling function just set one flag > which triggers its main process to handling the progress. Right, that's a good way to do it. > How about simply remove the code lines? > > --- walreceiver_old.c > +++ walreceiver.c > @@ -816,10 +816,6 @@ > > SetLatch(&WalRcv->latch); > > - /* Don't joggle the elbow of proc_exit */ > - if (!proc_exit_inprogress && WalRcvImmediateInterruptOK) > - ProcessWalRcvInterrupts(); > - > errno = save_errno; > } Hmm, I doubt it's that simple but I haven't studied this. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company