Re: [GENERAL] pg_rewind copy so much data

2017-09-29 Thread Michael Paquier
On Fri, Sep 29, 2017 at 6:22 PM, Hung Phan wrote: > Thanks for your help. Do you have any more ideas about my case? I cannot > find any reason for that. If pg_rewind just examines WAL for changed blocks > from the common checkpoint, why did it copy all data ? As I understand, the > information in

Re: [GENERAL] pg_rewind copy so much data

2017-09-29 Thread Hung Phan
Thanks for your help. Do you have any more ideas about my case? I cannot find any reason for that. If pg_rewind just examines WAL for changed blocks from the common checkpoint, why did it copy all data ? As I understand, the information in WAL about changes cannot cover all data in the database. O

Re: [GENERAL] pg_rewind copy so much data

2017-09-28 Thread Michael Paquier
On Fri, Sep 29, 2017 at 1:06 PM, Hung Phan wrote: > I used tablespace to store data and it seems to be that pg_rewind copied > everthing in the tablespace. Today I found an article posted by you (Michael > Paquier) and you said that there was no tablespace support. If so, is there > anyway to work

Re: [GENERAL] pg_rewind copy so much data

2017-09-28 Thread Hung Phan
Sorry for the late reply. I have checked those relfilenodes and they have existed. I used tablespace to store data and it seems to be that pg_rewind copied everthing in the tablespace. Today I found an article posted by you (Michael Paquier) and you said that there was no tablespace support. If so

Re: [GENERAL] pg_rewind copy so much data

2017-09-14 Thread Michael Paquier
On Fri, Sep 15, 2017 at 2:57 PM, Hung Phan wrote: > [...] Please do not top-post. This breaks the logic of the thread. > I use ver 9.5.3. You should update to the latest minor version available, there have been quite a couple of bug fixes in Postgres since this 9.5.3. > I have just run again a

Re: [GENERAL] pg_rewind copy so much data

2017-09-14 Thread Hung Phan
I use ver 9.5.3. I have just run again and get the debug log. It seems to be that I cannot send such big file to postgresql mail so I copy some parts here: fetched file "global/pg_control", length 8192 fetched file "pg_xlog/000D.history", length 475 servers diverged at WAL position 2/D69820C8

Re: [GENERAL] pg_rewind copy so much data

2017-09-13 Thread Michael Paquier
On Wed, Sep 13, 2017 at 2:21 PM, Hung Phan wrote: > If I run pg_rewind with debug option, it just show additional bunch of files > copied in directories like base or pg_tblspc. I claim that there is no data > inserted of modified from the first step. The only difference between two > server is cau

Re: [GENERAL] pg_rewind copy so much data

2017-09-12 Thread Hung Phan
Hi, Thanks for your response. I have just replayed switching master and slave once again: - one master and one slave (total size of each server is more than 4GB). Currently the last log of the slave is "started streaming WAL from primary at 2/D600 on timeline 10". - stop master, the slave s

Re: [GENERAL] pg_rewind copy so much data

2017-09-12 Thread Michael Paquier
On Wed, Sep 13, 2017 at 12:41 PM, Hung Phan wrote: > I have tested pg_rewind (ver 9.5) with the following scenario: > > - one master and one slave (total size of each server is more than 4GB) > - set wal_log_hint=on and restart both > - stop master, promote slave > - start old master again (now tw

[GENERAL] pg_rewind copy so much data

2017-09-12 Thread Hung Phan
Hi, I have tested pg_rewind (ver 9.5) with the following scenario: - one master and one slave (total size of each server is more than 4GB) - set wal_log_hint=on and restart both - stop master, promote slave - start old master again (now two servers have diverged) - stop old master, run pg_rewind