From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | Julian Schauder <julian(dot)schauder(at)credativ(dot)de> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: add 'waiting for replication' to pg_stat_activity.state |
Date: | 2015-12-03 00:00:03 |
Message-ID: | CAMsr+YHMEw4SeqDpO2jzV+fzBUR0EgkFCmMA0-DRsvr7mr0GyQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 3 December 2015 at 04:22, Julian Schauder <julian(dot)schauder(at)credativ(dot)de>
wrote:
> I suggest adding a new state to pg_stat_activity.state for backends that
> are
>
waiting for their synchronous commit to be flushed on the remote host.
>
>
Excellent idea. Anything that improves management and visibility into what
the system is doing like this is really valuable.
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.
There are no test changes in this patch, but that's reasonable because we
don't currently have a way to automate tests of sync rep.
I've attached a patch with minor wording/formatting changes, but I think
I'd like to change 'waiting' to true as well. Opinions?
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Attachment | Content-Type | Size |
---|---|---|
0001-Add-waiting-for-replication-state-to-pg_stat_activit.patch | text/x-patch | 3.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Julien Rouhaud | 2015-12-03 00:08:22 | Re: Postgres_FDW optimizations |
Previous Message | Robert Haas | 2015-12-02 23:50:04 | Re: Removing Functionally Dependent GROUP BY Columns |