Re: pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments - Mailing list pgsql-hackers

From Andres Freund
Subject Re: pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments
Date
Msg-id 20150213001811.GF9449@alap3.anarazel.de
Whole thread Raw
In response to Re: pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments  (Sergey Konoplev <gray.ru@gmail.com>)
Responses Re: pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments  (Sergey Konoplev <gray.ru@gmail.com>)
Re: pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
On 2015-02-12 11:44:05 -0800, Sergey Konoplev wrote:
> On Thu, Feb 12, 2015 at 11:40 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> > This obviously should not be the case. I'll have a look in a couple of hours. Until then you can likely  just work
aroundthe problem by creating the archive_status directory.
 
> 
> Thank you. Just let me know if you need some extra info or debugging.

No need for debugging. It's plain and simply a (cherry-pick) conflict I
resolved wrongly during backpatching. 9.3, 9.4 and master do not have
that problem. That whole fix was quite painful because every single
release had significantly different code :(. pg_basebackup/ is pretty
messy.
I'm not sure why my testsuite didn't trigger that problem. Possibly
because a retry makes things work :(

Somewhat uckily it's 9.2 only (9.3, 9.4 and master look correct, earlier
releases don't have pg_receivexlog) and can quite easily be worked
around by creating the archive_status directory.

If you want to fix it locally, you just need to replace
ReceiveXlogStream(conn, startpos, timeline, NULL, basedir,                  stop_streaming, standby_message_timeout,
false,true);
 
by
ReceiveXlogStream(conn, startpos, timeline, NULL, basedir,                  stop_streaming, standby_message_timeout,
false,false);
 

Yes, that and pretty much all other functions in that directory have too
many parameters.

Greetings,

Andres Freund

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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: gcc5: initdb produces gigabytes of _fsm files
Next
From: Michael Paquier
Date:
Subject: Re: Commit fest 2015-12 enters money time