Re: pg_rewind in contrib

From: Venkata Balaji N <nag1010(at)gmail(dot)com>
To: hlinnaka(at)iki(dot)fi
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Satoshi Nagayasu <snaga(at)uptime(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Michael Paquier <mpaquier(at)vmware(dot)com>
Subject: Re: pg_rewind in contrib
Date: 2015-03-26 03:23:10
Message-ID: CAEyp7J-vDiF4Wc0e=G9oJC=+LuBwZNjjo-UV5hki5-iXg8SkBg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I have committed this, with some more kibitzing. hope I have not missed
> any comments given so far. Many thanks for the review, and please continue
> reviewing and testing it :-).

I have been testing the pg_rewind and have an analysis to share along with
few questions -

I had a streaming replication setup with one master and one slave running
successfully.

Test 1 :

- Killed postgres process on master and promoted slave. Both were in sync
earlier.
- performed some operations (data changes) on newly promoted slave node and
shutdown
- Executed pg_rewind on old master and got the below message

*target server must be shut down cleanly*
*Failure, exiting*

If the master is crashed or killed abruptly, it may not be possible to do a
rewind. Is my understanding correct ?

Test 2 :

- On a successfully running streaming replication with one master and one
slave, i did a clean shutdown of master
- promoted slave
- performed some operations (data changes) on newly promoted slave and did
a clean shutdown
- Executed pg_rewind on the old master to sync with the latest changes on
new master. I got the below message

*The servers diverged at WAL position 0/A2000098 on timeline 1.*
*No rewind required.*

I am not getting this too.

Regards,
Venkata Balaji N

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-03-26 04:32:31 Re: pg_rewind in contrib
Previous Message Shigeru HANADA 2015-03-26 03:04:47 Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)