including pid's for `There are XX other sessions using the database`

From: Zhihong Yu <zyu(at)yugabyte(dot)com>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: including pid's for `There are XX other sessions using the database`
Date: 2022-08-19 17:10:43
Message-ID: CALNJ-vS9Wc_KEOBR9mwFU=kuW_exup0Jagv6HFeD-fM9GWHJzA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
Currently errdetail_busy_db() only shows the number of other sessions using
the database but doesn't give any detail about them.
For one of the customers,pg_stat_activity is showing lower number of
connections compared to the number revealed in the error message.

Looking at CountOtherDBBackends(), it seems proc->pid is available
when nbackends is incremented.

I want to poll the community on whether including proc->pid's in the error
message would be useful for troubleshooting.

Thanks

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message mahendrakar s 2022-08-19 18:35:50 Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory
Previous Message Bruce Momjian 2022-08-19 16:04:54 Re: Doc patch