From: | Arthur Silva <arthurprs(at)gmail(dot)com> |
---|---|
To: | Vladimir Borodin <root(at)simply(dot)name> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, hlinnaka(at)iki(dot)fi, Satoshi Nagayasu <snaga(at)uptime(dot)jp>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Venkata Balaji N <nag1010(at)gmail(dot)com>, Michael Paquier <mpaquier(at)vmware(dot)com> |
Subject: | Re: pg_rewind in contrib |
Date: | 2015-03-26 19:45:17 |
Message-ID: | CAO_YK0VBjCh1Fk-9y3tR1eijXg+1Pk7MQgjdyQYoj7ye990t2g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mar 26, 2015 4:20 AM, "Vladimir Borodin" <root(at)simply(dot)name> wrote:
>
>
>> 26 марта 2015 г., в 7:32, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
написал(а):
>>
>> On Thu, Mar 26, 2015 at 12:23 PM, Venkata Balaji N <nag1010(at)gmail(dot)com>
wrote:
>>>
>>> Test 1 :
>>>
>>> [...]
>>>
>>> If the master is crashed or killed abruptly, it may not be possible to
do a
>>> rewind. Is my understanding correct ?
>>
>>
>> Yep. This is mentioned in the documentation:
>> http://www.postgresql.org/docs/devel/static/app-pgrewind.html
>> "The target server must shut down cleanly before running pg_rewind>>.
>
>
> You can start old master, wait for crash recovery to complete, stop it
cleanly and then use pg_rewind. It works.
>
Shouldn't we have a flag so it does that automatically if necessary?
>>
>>> 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.
>>
>>
>> In this case the master WAL visibly did not diverge from the slave WAL
>> line. A rewind is done if the master touches new relation pages after
>> the standby has been promoted, and before the master is shutdown.
>> --
>> Michael
>>
>>
>> --
>> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-hackers
>
>
>
> --
> Да пребудет с вами сила...
> https://simply.name/ru
>
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2015-03-26 19:59:20 | Re: Remove fsync ON/OFF as a visible option? |
Previous Message | Heikki Linnakangas | 2015-03-26 18:51:53 | Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0 |