WALWriter active during recovery - Mailing list pgsql-hackers

From Simon Riggs
Subject WALWriter active during recovery
Date
Msg-id CA+U5nMJifauXvVbx=v3UbYbHO3Jw2rdT4haL6CCooEDM5=4ASQ@mail.gmail.com
Whole thread Raw
Responses Re: WALWriter active during recovery  (Andres Freund <andres@2ndquadrant.com>)
Re: WALWriter active during recovery  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Re: WALWriter active during recovery  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
Currently, WALReceiver writes and fsyncs data it receives. Clearly,
while we are waiting for an fsync we aren't doing any other useful
work.

Following patch starts WALWriter during recovery and makes it
responsible for fsyncing data, allowing WALReceiver to progress other
useful actions.

At present this is a WIP patch, for code comments only. Don't bother
with anything other than code questions at this stage.

Implementation questions are

* How should we wake WALReceiver, since it waits on a poll(). Should
we use SIGUSR1, which is already used for latch waits, or another
signal?

* Should we introduce some pacing delays if the WALreceiver gets too
far ahead of apply?

* Other questions you may have?

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

Attachment

pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Commitfest problems
Next
From: Simon Riggs
Date:
Subject: Logical Decoding follows timelines