Dangling Client Backend Process - Mailing list pgsql-hackers

From Rajeev rastogi
Subject Dangling Client Backend Process
Date
Msg-id BF2827DCCE55594C8D7A8F7FFD3AB77159964A51@szxeml521-mbs.china.huawei.com
Whole thread Raw
Responses Re: Dangling Client Backend Process  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
<div class="WordSection1"><p class="MsoNormal"><span style="font-size:13.0pt">I observed one strange behavior today
thatif postmaster process gets crashed/killed, then it kill all background processes but not the client backend
process.</span><pclass="MsoNormal"><span style="font-size:13.0pt">Moreover it is also allowed to execute query on the
connectedclient session without any other background process.</span><p class="MsoNormal"><span
style="font-size:13.0pt">ButIf I try to execute some command (like checkpoint) from the client session which requires
anybackground task to perform, it fails because it cannot find the corresponding background process (like checkpoint
process).</span><pclass="MsoNormal"><span style="font-size:13.0pt"> </span><p class="MsoNormal"><span
style="font-size:13.0pt">Iam not sure if this is already known behavior but I found it to be little awkward. This may
leadto some unknown behavior in user application.</span><p class="MsoNormal"><span style="font-size:13.0pt"> </span><p
class="MsoNormal"><spanstyle="font-size:13.0pt">Currently All background process keeps checking if Postmaster is Alive
whilethey wait for any event but for client backend process there is no such mechanism.</span><p
class="MsoNormal"><spanstyle="font-size:13.0pt"> </span><p class="MsoNormal"><span style="font-size:13.0pt">One way to
handlethis issue will be to check whether postmaster is alive after every command read but it will add extra cost for
eachquery execution.</span><p class="MsoNormal"><span style="font-size:13.0pt"> </span><p class="MsoNormal"><span
style="font-size:13.0pt">Anycomments?        </span><p class="MsoNormal"><span style="font-size:13.0pt"> </span><p
class="MsoNormal"><i><spanstyle="font-size:13.0pt;color:black">Thanks and Regards,</span></i><p
class="MsoNormal"><i><spanstyle="font-size:13.0pt">Kumar Rajeev Rastogi<span style="color:black">
</span></span></i><spanstyle="font-size:13.0pt"></span></div> 

pgsql-hackers by date:

Previous
From: Satoshi Nagayasu
Date:
Subject: Re: pg_stat_statements query jumbling question
Next
From: Michael Paquier
Date:
Subject: Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.