Re: proposal: psql: psql variable BACKEND_PID

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Jelte Fennema <me(at)jeltef(dot)nl>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: proposal: psql: psql variable BACKEND_PID
Date: 2023-03-18 16:57:32
Message-ID: CAFj8pRC34DWDPj_0kK1cvo4KcvhHX_6dBufT4S_zG50MB=kLnw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

so 18. 3. 2023 v 16:24 odesílatel Andrew Dunstan <andrew(at)dunslane(dot)net>
napsal:

>
> On 2023-02-16 Th 23:04, Pavel Stehule wrote:
>
>
>
> čt 16. 2. 2023 v 12:49 odesílatel Jelte Fennema <me(at)jeltef(dot)nl> napsal:
>
>> On Thu, 16 Feb 2023 at 12:44, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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.
>

ok

regards

Pavel

>
> cheers
>
>
> andrew
>
> --
> Andrew Dunstan
> EDB: https://www.enterprisedb.com
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-03-18 18:18:04 Re: generate_series for timestamptz and time zone problem
Previous Message Andrew Dunstan 2023-03-18 15:24:09 Re: proposal: psql: psql variable BACKEND_PID