Re: proposal: add 'waiting for replication' to pg_stat_activity.state

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: proposal: add 'waiting for replication' to pg_stat_activity.state
Дата
Msg-id CAMsr+YFiUNqz5FC0f8q1c=VrFvpofisWa8aW+uZDtM5vMsPk5Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: add 'waiting for replication' to pg_stat_activity.state  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: proposal: add 'waiting for replication' to pg_stat_activity.state  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On 3 December 2015 at 09:32, Peter Eisentraut <peter_e@gmx.net> wrote:
On 12/2/15 7:00 PM, Craig Ringer wrote:
> I notice that you don't set the 'waiting' flag.  'waiting' is presently
> documented as:
>
>        <entry>True if this backend is currently waiting on a lock</entry>
>
> ... but I'm inclined to just widen its definition and set it here, since
> we most certainly are waiting, and the column isn't named
> 'waiting_on_a_lock'. It shouldn't upset various canned lock monitoring
> queries people have since they generally do an inner join on pg_locks
> anyway.

I'm not so sure about that assumption.

Even if it's an outer join, the worst that'll happen is that they'll get entries with nulls in pg_locks. I don't think it's worth worrying about too much.

We could always mitigate it by adding a pg_lock_status view to the system catalogs with a decent canned query over pg_stat_activity and pg_locks, so people can stop copying & pasting from the wiki or using buggy homebrew queries ;)

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Refactor Perl test code
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Fwd: Another little thing about psql wrapped expanded output