Re: Comfortably check BackendPID with psql

From: Julien Rouhaud <julien(dot)rouhaud(at)dalibo(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>, Naoya Anzai <nao-anzai(at)xc(dot)jp(dot)nec(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Akio Iwaasa <aki-iwaasa(at)vt(dot)jp(dot)nec(dot)com>
Subject: Re: Comfortably check BackendPID with psql
Date: 2015-07-07 12:48:52
Message-ID: 559BCAB4.7050405@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Le 07/07/2015 13:41, Andres Freund a écrit :
> On 2015-07-05 14:11:38 +0200, Julien Rouhaud wrote:
>> Tiny for me too, but I sometimes had the need.
>>
>> I can't really see any good reason not to add a %p escape to psql's
>> PROMPT, so I'm attaching a simple patch to implement it. Unless someone
>> objects, I'll add it to the next commitfest.
>
> Pushed the patch. I only made a minor belt-and-suspenders type of
> change, namely to check whether PQbackendPID() returns 0 and not print
> that and replaced PID by pid in the docs and comments.
>
> Thanks for the patch!
>

Thanks!

> Greetings,
>
> Andres Freund
>

--
Julien Rouhaud
http://dalibo.com - http://dalibo.org

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-07-07 12:55:51 Re: pg_receivexlog --create-slot-if-not-exists
Previous Message Fujii Masao 2015-07-07 12:47:27 Re: FPW compression leaks information