Dangling Client Backend Process

From: Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Dangling Client Backend Process
Date: 2015-10-10 10:12:32
Message-ID: BF2827DCCE55594C8D7A8F7FFD3AB77159964A51@szxeml521-mbs.china.huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.
Moreover it is also allowed to execute query on the connected client session without any other background process.
But If I try to execute some command (like checkpoint) from the client session which requires any background task to perform, it fails because it cannot find the corresponding background process (like checkpoint process).

I am not sure if this is already known behavior but I found it to be little awkward. This may lead to some unknown behavior in user application.

Currently All background process keeps checking if Postmaster is Alive while they wait for any event but for client backend process there is no such mechanism.

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.

Any comments?

Thanks and Regards,
Kumar Rajeev Rastogi

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-10-10 11:43:33 Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.
Previous Message Satoshi Nagayasu 2015-10-10 06:46:43 Re: pg_stat_statements query jumbling question