Re: Changeset Extraction v7.9.1

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Changeset Extraction v7.9.1
Date: 2014-03-18 14:23:44
Message-ID: 20140318142344.GG13855@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2014-03-17 14:16:38 +0100, Andres Freund wrote:
> On 2014-03-17 09:13:38 -0400, Robert Haas wrote:
> > On Mon, Mar 17, 2014 at 8:29 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> > >> Perhaps there could be a switch for an fsync interval, or something
> > >> like that. The default could be, say, to fsync every 10 seconds. And
> > >> if you want to change it, then go ahead; 0 disables. Writing to
> > >> standard output would be documented as unreliable. Other ideas
> > >> welcome.
> > >
> > > Hm. That'll be a bit nasty. fsync() is async signal safe, but it's still
> > > forbidden to be called from a signal on windows IIRC. I guess we can
> > > couple it with the standby_message_timeout stuff.
> >
> > Eh... I don't see any need to involve signals. I'd just check after
> > each write() whether enough time has passed, or something like that.
>
> What if no new writes are needed? Because e.g. there's either no write
> activity on the primary or all writes are in another database or
> somesuch?
> I think checking in sendFeedback() is the best bet...

So, I've tried to implement the things you asked for. Changes:
* reopen config files on SIGHUP to allow for rotating files
* use PQEexpBuffer instead of handrolling stuff
* fsync the output file if either --fsync-interval seconds passed, or
the server asks for feedback.
* report back a correct flush position.
* updated documentation

Greetings,

Andres Freund

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

Attachment Content-Type Size
0001-Add-pg_recvlogical-a-commandline-tool-to-receive-dat.patch text/x-patch 37.6 KB
0002-Documentation-for-logical-decoding.patch text/x-patch 54.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-03-18 14:35:16 Re: Portability issues in shm_mq
Previous Message Alvaro Herrera 2014-03-18 14:15:11 Re: pg_archivecleanup bug