Re: pg_rewind: confused about recovery.conf/restore_command - Mailing list pgsql-admin

From Jerry Sievers
Subject Re: pg_rewind: confused about recovery.conf/restore_command
Date
Msg-id 878tdcqfve.fsf@jsievers.enova.com
Whole thread Raw
In response to Re: pg_rewind: confused about recovery.conf/restore_command  (Rui DeSousa <rui.desousa@icloud.com>)
List pgsql-admin
Rui DeSousa <rui.desousa@icloud.com> writes:

> Hi Jerry,
>
> That has been my experience as well; pg_rewind does not fetch the WAL
> files.

Hmmm, just prior to my email here last night was my 2nd attempt, taking
a few hours of r/d time to eventually conclude that I was
misunderstanding the docs :-)

A few mentions of recovery.conf in the docs themselves plus what I found
searching Google certainly left me with the impression that pg_rewind
itself knows how to try using a restore_command if found in a
recovery.conf file of the target system to fetch WALs.


> You can use following parameter to keep the most recent logs; i.e. a
> couple of hours worth.  That will allow pg_rewind to work during that

Yup this is obvious and I tested same with OK results.

> time frame —  If it is still missing a WAL file or two you can
> manually copy them over in a pinch.

Yes and in fact I used my restore_command to do so.

>
>  wal_keep_segments
>
>
> p.s. I switched to using ZFS snapshots instead.

Oh, my site is quite familiar with FS or SAN/array snapshots and we use
them all the time.

Just felt like pg_rewind looked like something we should try.

I'll wait to see if others can shed more light on this.

Thanks



>
>

--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
p: 312.241.7800


pgsql-admin by date:

Previous
From: Azimuddin Mohammed
Date:
Subject: Postgres HA
Next
From: Scott Marlowe
Date:
Subject: Re: Postgres HA