Re: Basebackups reported as idle

2017-12-29 Thread Magnus Hagander
On Fri, Dec 29, 2017 at 3:11 PM, David Steele wrote: > On 12/29/17 6:49 AM, Michael Paquier wrote: > > On Thu, Dec 28, 2017 at 06:21:46PM +0100, Magnus Hagander wrote: > >> On Fri, Dec 22, 2017 at 2:31 AM, Michael Paquier < > michael.paqu...@gmail.com> > >> wrote: > >>> Could you update the patch

Re: Basebackups reported as idle

2017-12-29 Thread Alvaro Herrera
Michael Paquier wrote: > On Thu, Dec 28, 2017 at 06:21:46PM +0100, Magnus Hagander wrote: > > I thought I had, but I can see now that email was a figment of my > > imagination :) > > I'll take that as a fragment instead. Not at all ... https://www.merriam-webster.com/dictionary/figment "somethin

Re: Basebackups reported as idle

2017-12-29 Thread David Steele
On 12/29/17 6:49 AM, Michael Paquier wrote: > On Thu, Dec 28, 2017 at 06:21:46PM +0100, Magnus Hagander wrote: >> On Fri, Dec 22, 2017 at 2:31 AM, Michael Paquier >> wrote: >>> Could you update the patch? >> >> I thought I had, but I can see now that email was a figment of my >> imagination :) >

Re: Basebackups reported as idle

2017-12-29 Thread Michael Paquier
On Thu, Dec 28, 2017 at 06:21:46PM +0100, Magnus Hagander wrote: > On Fri, Dec 22, 2017 at 2:31 AM, Michael Paquier > wrote: >> Could you update the patch? > > I thought I had, but I can see now that email was a figment of my > imagination :) I'll take that as a fragment instead. The patch as pr

Re: Basebackups reported as idle

2017-12-28 Thread Magnus Hagander
On Fri, Dec 22, 2017 at 2:31 AM, Michael Paquier wrote: > On Thu, Dec 21, 2017 at 02:46:15PM +0100, Magnus Hagander wrote: > > On Thu, Dec 21, 2017 at 1:38 AM, Michael Paquier < > michael.paqu...@gmail.com> > > wrote: > >> I think that the call to pgstat_report_activity in WalSndLoop() should > >

Re: Basebackups reported as idle

2017-12-21 Thread Michael Paquier
On Thu, Dec 21, 2017 at 02:46:15PM +0100, Magnus Hagander wrote: > On Thu, Dec 21, 2017 at 1:38 AM, Michael Paquier > wrote: >> I think that the call to pgstat_report_activity in WalSndLoop() should >> be kept as well. There is a small gap between the moment the process >> is started and the first

Re: Basebackups reported as idle

2017-12-21 Thread Magnus Hagander
On Thu, Dec 21, 2017 at 1:38 AM, Michael Paquier wrote: > On Wed, Dec 20, 2017 at 9:02 PM, Magnus Hagander > wrote: > > On Wed, Dec 20, 2017 at 12:50 PM, Michael Paquier > > wrote: > > Yes. Of course. I can't read. That's the same as the notice below about > it > > not returning false -- I mana

Re: Basebackups reported as idle

2017-12-20 Thread Michael Paquier
On Wed, Dec 20, 2017 at 9:02 PM, Magnus Hagander wrote: > On Wed, Dec 20, 2017 at 12:50 PM, Michael Paquier > wrote: > Yes. Of course. I can't read. That's the same as the notice below about it > not returning false -- I managed to miss the extra if() there, and thought > it always exited with ER

Re: Basebackups reported as idle

2017-12-20 Thread Alvaro Herrera
Magnus Hagander wrote: > PFA a patch that fixes this. I think this is bugfix-for-backpatch, I don't > think it has a large risk of breaking things. Thoughts? Agreed. As long as it doesn't show up as idle-in-transaction afterwards or something odd like that, it should be okay to backpatch. (I su

Re: Basebackups reported as idle

2017-12-20 Thread Magnus Hagander
On Wed, Dec 20, 2017 at 12:50 PM, Michael Paquier wrote: > On Wed, Dec 20, 2017 at 6:07 PM, Magnus Hagander > wrote: > > What about the attached? > > The new positions look good to me, still aren't you missing the case > where a SQL command is found and exec_replication_command returns > false?

Re: Basebackups reported as idle

2017-12-20 Thread Michael Paquier
On Wed, Dec 20, 2017 at 6:07 PM, Magnus Hagander wrote: > What about the attached? The new positions look good to me, still aren't you missing the case where a SQL command is found and exec_replication_command returns false? This should be switched to idle as well. + /* Report to pgstat that t

Re: Basebackups reported as idle

2017-12-20 Thread Magnus Hagander
On Wed, Dec 20, 2017 at 6:11 AM, Michael Paquier wrote: > On Tue, Dec 19, 2017 at 11:50 PM, David Steele > wrote: > > On 12/19/17 4:56 AM, Magnus Hagander wrote: > >> AFAICT, base backups running on the replication protocol are always > >> reported as "idle" in pg_stat_activity. This seems to ha

Re: Basebackups reported as idle

2017-12-19 Thread Michael Paquier
On Tue, Dec 19, 2017 at 11:50 PM, David Steele wrote: > On 12/19/17 4:56 AM, Magnus Hagander wrote: >> AFAICT, base backups running on the replication protocol are always >> reported as "idle" in pg_stat_activity. This seems to have been an >> oversight in the "include walsender backends in pg_sta

Re: Basebackups reported as idle

2017-12-19 Thread David Steele
Hi Magnus, On 12/19/17 4:56 AM, Magnus Hagander wrote: > AFAICT, base backups running on the replication protocol are always > reported as "idle" in pg_stat_activity. This seems to have been an > oversight in the "include walsender backends in pg_stat_activity" in 10, > which does include it for w

Basebackups reported as idle

2017-12-19 Thread Magnus Hagander
AFAICT, base backups running on the replication protocol are always reported as "idle" in pg_stat_activity. This seems to have been an oversight in the "include walsender backends in pg_stat_activity" in 10, which does include it for walsenders in general, just not for the ones sending base backups