Re: Dangling Client Backend Process - Mailing list pgsql-hackers

From Rajeev rastogi
Subject Re: Dangling Client Backend Process
Date
Msg-id BF2827DCCE55594C8D7A8F7FFD3AB771599653F7@szxeml521-mbs.china.huawei.com
Whole thread
In response to Re: Dangling Client Backend Process  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers

On 10 October 2015 20:45, Amit Kapila Wrote:

 

>> 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.

 

> This is a known behaviour and there was some discussion on this

> topic [1] previously as well.  I think that thread didn't reach to conclusion,

> but there were couple of other reasons discussed in that thread as well to

> have the behaviour as you are proposing here.

 

Oops..I did not know about this. I shall check the older thread to get other opinions.

 

>> One way to handle this issue will be to check whether postmaster is alive after every command read but it will add extra cost for each query execution.

 

> I don't think that is a good idea as if there is no command execution

> it will still stay as it is and doing such operations on each command

> doesn't sound to be good idea even though overhead might not be

> big.  There are some other ideas discussed in that thread [2] to achieve

> this behaviour, but I think we need to find a portable way to achieve it.

 

Yes, you are right that process will not be closed till a new command comes but I think it does not harm functionality in anyway except that the process and its acquired resources

does not get freed. Also use-case of application will be very less where their client process stays idle for very long time.

But at the same time I agree this is not the best solution, we should look for more appropriate/better one.

Now as it is confirmed to be valid issue, I will spend some time on this to find if there is something more appropriate solution.

 

Thanks and Regards,

Kumar Rajeev Rastogi

pgsql-hackers by date:

Previous
From: Haribabu Kommi
Date:
Subject: Re: Parallel Seq Scan
Next
From: Peter Geoghegan
Date:
Subject: Re: More work on SortSupport for text - strcoll() and strxfrm() caching