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

2016-02-01 Thread Alvaro Herrera
Thomas Munro wrote: > Thinking of other patches in flight, I think I'd want the proposed > N-sync standbys feature to be able to explain in more detail what it's > waiting for (and likewise my causal reads proposal which does that via > the process title), though I realise that the details of how/

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

2016-01-28 Thread Thomas Munro
On Thu, Dec 3, 2015 at 1:00 PM, Craig Ringer wrote: > On 3 December 2015 at 04:22, Julian Schauder > 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. A

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

2016-01-18 Thread Alvaro Herrera
Andres Freund wrote: > On December 4, 2015 9:48:55 AM GMT+01:00, Craig Ringer > wrote: > >On 3 December 2015 at 22:58, Amit Kapila > >wrote: > > > >> On Thu, Dec 3, 2015 at 9:02 AM, Craig Ringer > >> wrote: > > >http://www.postgresql.org/message-id/CAA4eK1+=5Ex8-5NRr3u94=_t2p65v0kcjZ5rXddVmkx=

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

2015-12-04 Thread Andres Freund
On December 4, 2015 9:48:55 AM GMT+01:00, Craig Ringer wrote: >On 3 December 2015 at 22:58, Amit Kapila >wrote: > >> On Thu, Dec 3, 2015 at 9:02 AM, Craig Ringer >> wrote: >http://www.postgresql.org/message-id/CAA4eK1+=5Ex8-5NRr3u94=_t2p65v0kcjZ5rXddVmkx=lwa...@mail.gmail.com >> >Good point. I

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

2015-12-04 Thread Craig Ringer
On 3 December 2015 at 22:58, Amit Kapila wrote: > On Thu, Dec 3, 2015 at 9:02 AM, Craig Ringer > wrote: > > > > On 3 December 2015 at 09:32, Peter Eisentraut wrote: > >> > >> On 12/2/15 7:00 PM, Craig Ringer wrote: > >> > I notice that you don't set the 'waiting' flag. 'waiting' is > presently

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

2015-12-03 Thread Amit Kapila
On Thu, Dec 3, 2015 at 9:02 AM, Craig Ringer wrote: > > On 3 December 2015 at 09:32, Peter Eisentraut 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: >> > >> >True if this backend is curr

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

2015-12-02 Thread Craig Ringer
On 3 December 2015 at 09:32, Peter Eisentraut 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: > > > >True if this backend is currently waiting on a lock > > > > ... but I'm inclined to just wid

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

2015-12-02 Thread Peter Eisentraut
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: > >True if this backend is currently waiting on a lock > > ... but I'm inclined to just widen its definition and set it here, since > we most certainly are wa

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

2015-12-02 Thread Craig Ringer
On 3 December 2015 at 04:22, Julian Schauder 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. > I chose 'waiting for synchronous replication' for now. > > I've added this to the next

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

2015-12-02 Thread Craig Ringer
On 3 December 2015 at 04:22, Julian Schauder 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

[HACKERS] proposal: add 'waiting for replication' to pg_stat_activity.state

2015-12-02 Thread Julian Schauder
Hello Hackers, I recently analyzed an incident where a major lag in synchronous replication blocked a number of synchronous backends. I found myself looking at backends that, according to pg_stat_activity, were neither waiting nor idle but yet they didn't finish their work. As it turns out, the