Re: proposal: psql: psql variable BACKEND_PID

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: proposal: psql: psql variable BACKEND_PID
Дата
Msg-id 7877cb6f-073b-f7b2-9173-dfe740cd9047@dunslane.net
обсуждение исходный текст
Ответ на Re: proposal: psql: psql variable BACKEND_PID  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: psql: psql variable BACKEND_PID
Список pgsql-hackers


On 2023-02-16 Th 23:04, Pavel Stehule wrote:


čt 16. 2. 2023 v 12:49 odesílatel Jelte Fennema <me@jeltef.nl> napsal:
On Thu, 16 Feb 2023 at 12:44, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> To find and use pg_backend_pid is not rocket science. But use :BACKEND_PID is simpler.

I wanted to call out that if there's a connection pooler (e.g.
PgBouncer) in the middle, then BACKEND_PID (and %p) are incorrect, but
pg_backend_pid() would work for the query. This might be an edge case,
but if BACKEND_PID is added it might be worth listing this edge case
in the docs somewhere.

good note



This patch is marked RFC, but given the comments upthread from Tom, Andres and Peter, I think it should actually be Rejected.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: logical decoding and replication of sequences, take 2
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: psql: psql variable BACKEND_PID