Re: Dangling Client Backend Process - Mailing list pgsql-hackers
From | Rajeev rastogi |
---|---|
Subject | Re: Dangling Client Backend Process |
Date | |
Msg-id | BF2827DCCE55594C8D7A8F7FFD3AB77159965D4C@szxeml521-mbs.china.huawei.com Whole thread Raw |
In response to | Dangling Client Backend Process (Rajeev rastogi <rajeev.rastogi@huawei.com>) |
Responses |
Re: Dangling Client Backend Process
|
List | pgsql-hackers |
<div class="WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">On</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">12thOctober 2015 20:45, Rajeev Rastogi Wrote:</span><p class="MsoNormal"><spanstyle="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span><p class="MsoNormal"><span style="font-size:13.0pt">>>>I observed one strange behavior today that if postmaster process gets crashed/killed,then it kill all background processes but not the client backend process.</span><p class="MsoNormal"><spanstyle="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><p class="MsoNormal">>>This is a known behaviour and there was some discussion on this<p class="MsoNormal">>> topic[1] previously as well.<p class="MsoNormal"> <p class="MsoNormal"><span style="font-size:13.0pt">> Now as it is confirmedto be valid issue, I will spend some time on this to find if there is something more appropriate solution.</span><pclass="MsoNormal"><span style="font-size:13.0pt"> </span><p class="MsoNormal"><span style="font-size:13.0pt">Ichecked the latest code and found Heikki has already added code for secure_read using the latchmechanism (using WaitLatchOrSocket). It currently waits for two events i.e. WL_LATCH_SET and WL_SOCKET_READABLE. </span><pclass="MsoNormal"><span style="font-size:13.0pt"> Commit id: 80788a431e9bff06314a054109fdea66ac538199</span><pclass="MsoNormal"><span style="font-size:13.0pt"> </span><p class="MsoNormal"><spanstyle="font-size:13.0pt">If we add the event WL_POSTMASTER_DEATH also, client backend process handlingwill become same as other backend process. So postmaster death can be detected in the same way.</span><p class="MsoNormal"><spanstyle="font-size:13.0pt"> </span><p class="MsoNormal"><span style="font-size:13.0pt">But I am notsure if WL_POSTMASTER_DEATH event was not added intentionally for some reason. Please confirm.</span><p class="MsoNormal"><spanstyle="font-size:13.0pt">Also is it OK to add this even handling in generic path of Libpq?</span><pclass="MsoNormal"><span style="font-size:13.0pt"> </span><p class="MsoNormal"><span style="font-size:13.0pt">Pleaselet me know if I am missing something?</span><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><pclass="MsoNormal"><i><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:black">Thanksand Regards,</span></i><p class="MsoNormal"><i><spanstyle="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Kumar Rajeev Rastogi</span></i><i><spanstyle="font-size:11.0pt;font-family:"Calibri","sans-serif";color:black"> </span></i></div>
pgsql-hackers by date: