Re: pg_receivelog completion command - Mailing list pgsql-hackers

From Andres Freund
Subject Re: pg_receivelog completion command
Date
Msg-id 20141102134240.GG28295@alap3.anarazel.de
Whole thread Raw
In response to Re: pg_receivelog completion command  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On 2014-11-02 14:33:32 +0100, Magnus Hagander wrote:
> On Sun, Nov 2, 2014 at 2:31 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> > This will nead some persistent state about the commands success -
> > similar to the current archive status stuff. Given retries and
> > everything it might end up to be easier to have a separate process.
> 
> That is mostly what I meant with my thid option, the "background
> process". But I guess we can do the actual queueing in the main
> process of course. But yeah, it comes down to if we wan tto deal with
> retries and such at all, or just leave that up to the external
> command. We could for example say that if you specify -a, we just stop
> doing the rename() in pg_receivexlog and *instead* do the archive
> command, making it that commands responsibility to move the file "from
> .partial". That might make things simpler.

I don't think that's good enough. Unless I miss something you really
can't reliably deal with pg_receivelog being stopped at arbitrary
moments that way. I also think that moving that much into the command
will nail down implementation details that we really don't want to
expose.

Greetings,

Andres Freund

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



pgsql-hackers by date:

Previous
From: Mikko Tiihonen
Date:
Subject: Re: Pipelining executions to postgresql server
Next
From: Jaime Casanova
Date:
Subject: Re: Let's drop two obsolete features which are bear-traps for novices