Re: [HACKERS] run pg_rewind on an uncleanly shut down cluster.

2015-10-06 Thread Michael Paquier
On Tue, Oct 6, 2015 at 12:41 AM, Oleksii Kliukin wrote: > pg_rewind -D postgresql0 --source-server="host=127.0.0.1 port=5433 > dbname=postgres" > The servers diverged at WAL position 0/360 on timeline 1. > could not open file

Re: [HACKERS] run pg_rewind on an uncleanly shut down cluster.

2015-10-06 Thread Oleksii Kliukin
> On 06 Oct 2015, at 08:58, Michael Paquier > wrote: > > On Tue, Oct 6, 2015 at 12:41 AM, Oleksii Kliukin > wrote: >> pg_rewind -D postgresql0 --source-server="host=127.0.0.1 port=5433 >> dbname=postgres" The servers diverged at WAL position

Re: [HACKERS] run pg_rewind on an uncleanly shut down cluster.

2015-10-06 Thread Michael Paquier
On Tue, Oct 6, 2015 at 6:04 PM, Oleksii Kliukin wrote: > Does pg_rewind actually rely on the cluster being rewound to finish > recovery? That's not mandatory AFAIK. I think that Heikki has just implemented it in the safest way possible for a first shot. That's something we

Re: [HACKERS] run pg_rewind on an uncleanly shut down cluster.

2015-10-06 Thread Bruce Momjian
On Tue, Oct 6, 2015 at 03:58:44PM +0900, Michael Paquier wrote: > On Tue, Oct 6, 2015 at 12:41 AM, Oleksii Kliukin wrote: > > pg_rewind -D postgresql0 --source-server="host=127.0.0.1 port=5433 > > dbname=postgres" > > The servers diverged at WAL position 0/360 on timeline

Re: [HACKERS] run pg_rewind on an uncleanly shut down cluster.

2015-10-05 Thread Oleksii Kliukin
> On 05 Oct 2015, at 18:04, Bruce Momjian wrote: > > On Mon, Oct 5, 2015 at 05:41:07PM +0200, Oleksii Kliukin wrote: >> Hello, >> >> I'm trying to find out how to rewind a cluster that was not shut down >> cleanly, in order to implement pg_rewind support in patroni (an >>

Re: [HACKERS] run pg_rewind on an uncleanly shut down cluster.

2015-10-05 Thread Bruce Momjian
On Mon, Oct 5, 2015 at 05:41:07PM +0200, Oleksii Kliukin wrote: > Hello, > > I'm trying to find out how to rewind a cluster that was not shut down > cleanly, in order to implement pg_rewind support in patroni (an > automated failover system, https://github.com/zalando/patroni). > > At the