Re: [HACKERS] Optional message to user when terminating/cancelling backend - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: [HACKERS] Optional message to user when terminating/cancelling backend
Date
Msg-id CAKFQuwYTiBuxWjhYiiRgve79fX8fh5wgx=jY-=w=5c+0t9dvEQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Optional message to user when terminating/cancellingbackend  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: [HACKERS] Optional message to user when terminating/cancellingbackend
List pgsql-hackers
On Tue, Jun 20, 2017 at 11:54 AM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Satyanarayana Narlapuram wrote:

> Unless you have a lot of users running psql manually, I don't see how
> this is actually very useful or actionable.  What would the user do with
> the information?  Hopefully your users already trust that you'd keep the
> downtime to the minimum possible.
>

Why wouldn't this be useful in application logs?  Spurious dropped
connections during application execution would be alarming.  Seeing a
message from the DBA when looking into those would be a painless and
quick way to alleviate stress.

pg_cancel_backend(<pid>, 'please try not to leave sessions in an "idle
in transaction" state...') would also seem like a useful message to
communicate; to user or application.  Sure, some of this can, and
maybe would also need to, be done out-of-band but this communication
channel seems worthy enough to at least evaluate the provided
implementation.

David J.



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [HACKERS] postgresql transactons not fully isolated
Next
From: Satyanarayana Narlapuram
Date:
Subject: Re: [HACKERS] Optional message to user when terminating/cancellingbackend