Re: BackendKeyData is mandatory?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BackendKeyData is mandatory?
Date: 2025-06-17 03:06:26
Message-ID: CAKFQuwbWMrJ4piRGfceg2fQKwyx4FOk+jmU2xgbbN-=8oPNxZw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Monday, June 16, 2025, Tatsuo Ishii <ishii(at)postgresql(dot)org> wrote:

>
> My question is, BackendKeyData is mandatory or not. Currently
> Pgpool-II raises a fatal error if BackendKeyData is not sent before
> ReadyForQuery arrives. This is because without the message, frontend
> cannot send a CancelRequest message later on, as there's no secret
> key.

I wouldn’t expect a proxy to make a judgement here; but to simply forward
what does show up and otherwise stay silent. If there is proxy layer code
needed to deal with its absence ignoring the cancel attempt with a log
warning would be sufficient. Otherwise, the user has made their choices
and this is an optional feature in practice (though resorting to
pg_cancel_query make be required for truly hung processes).

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Yan Haibo 2025-06-17 03:12:38 回复: 回复: 回复: Fix potential overflow risks from wcscpy and sprintf
Previous Message Tom Lane 2025-06-17 02:58:04 Re: pg_upgrade fails with an error "object doesn't exist"