Re: Comfortably check BackendPID with psql

From: Andres Freund <andres(at)anarazel(dot)de>
To: Naoya Anzai <nao-anzai(at)xc(dot)jp(dot)nec(dot)com>
Cc: "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-06-11 09:55:56
Message-ID: 20150611095556.GB16018@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2015-06-11 09:41:17 +0000, Naoya Anzai wrote:
> This is a so tiny patch but I think it is very useful for hackers and DBAs.
> When we debug with psql, we frequently use "SELECT pg_backend_pid();".
> This can change the input of the 24 characters to the only 4 characters!

Not a big fan of that abbreviation itself. What I'd wondered about
instead - and actually had patched into my psql at some point - is
adding an appropriate escape to psql's PROMPT. I think that'd serve your
purpose as well?

Regards,

Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Naoya Anzai 2015-06-11 10:24:29 Re: Comfortably check BackendPID with psql
Previous Message Magnus Hagander 2015-06-11 09:52:12 Re: skipping pg_log in basebackup (was Re: pg_basebackup and pg_stat_tmp directory)