Re: [HACKERS] subscription worker signalling wal writer too much - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] subscription worker signalling wal writer too much
Date
Msg-id CAB7nPqSH_OiiTveDsBdgP07C5_nrahTQwauUBLnpGN6SWdq7ew@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] subscription worker signalling wal writer too much  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] subscription worker signalling wal writer too much  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Thu, Oct 5, 2017 at 10:59 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> This patch wasn't formatted very nicely; attached is a version that
> pgindent likes better and doesn't bust past 80 columns.
>
> I think this patch needs significantly better comments.  There's no
> explanation of the rather complex formula the patch proposed to use.
> Maybe it's just copied from someplace else that does have a comment,
> but in that case, the comments here should mention that.  And the
> comment in the other place should probably be updated too, like:
>
> /* Make sure to keep this in sync with the similar logic in
> XLogDoAwesomeStuff() */

I have just gone through this thread, and reducing the amount of times
the WAL writer is woken up is something worth doing. The last version
if v3 that Robert has sent in
https://www.postgresql.org/message-id/CA+TgmoZhw_nyrxYUqSuDh-XEJya-YzfwShki5NuDS=UfgvodrA@mail.gmail.com.
As far as I can see, the smarter formula presented here comes from
XLogBackgroundFlush(). Jeff, could you update the patch to reflect
that the new condition you are adding comes from there? I am switching
the patch as "waiting on author" for now.
--
Michael


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256
Next
From: Masahiko Sawada
Date:
Subject: Re: Failed to delete old ReorderBuffer spilled files