RE: [bug fix] pg_rewind takes long time because it mistakenly copies data files

2018-03-05 Thread Tsunakawa, Takayuki
From: Fujii Masao [mailto:masao.fu...@gmail.com] > Thanks for the patch! Pushed. Thank you. I'm glad to see you again on this list. Regards Takayuki Tsunakawa

Re: [bug fix] pg_rewind takes long time because it mistakenly copies data files

2018-03-05 Thread Fujii Masao
On Wed, Feb 28, 2018 at 3:58 PM, Tsunakawa, Takayuki wrote: > From: Michael Paquier [mailto:mich...@paquier.xyz] >> So I would propose to just do that later. I have looked a second time at >> your patch, attached is the set of tests I have run: > > Thanks so much, that has helped me a lot! > >> I

RE: [bug fix] pg_rewind takes long time because it mistakenly copies data files

2018-02-27 Thread Tsunakawa, Takayuki
From: Michael Paquier [mailto:mich...@paquier.xyz] > So I would propose to just do that later. I have looked a second time at > your patch, attached is the set of tests I have run: Thanks so much, that has helped me a lot! > I have one small comment though. The comment block at the beginning of

Re: [bug fix] pg_rewind takes long time because it mistakenly copies data files

2018-02-27 Thread Michael Paquier
On Mon, Feb 26, 2018 at 06:24:02PM +0900, Michael Paquier wrote: > Anything like that would be work only for HEAD I think as that's a bit > of refactoring. And indeed it could give you a good introduction to the > TAP facility. So I would propose to just do that later. I have looked a second tim

Re: [bug fix] pg_rewind takes long time because it mistakenly copies data files

2018-02-26 Thread Michael Paquier
On Mon, Feb 26, 2018 at 08:13:02AM +, Tsunakawa, Takayuki wrote: > From: Michael Paquier [mailto:mich...@paquier.xyz] >> Your patch is able to fix that. I have also checked that after diverging >> the promoted server with more data and inserting data on the old primary >> then the correct set

RE: [bug fix] pg_rewind takes long time because it mistakenly copies data files

2018-02-26 Thread Tsunakawa, Takayuki
From: Michael Paquier [mailto:mich...@paquier.xyz] > Your patch is able to fix that. I have also checked that after diverging > the promoted server with more data and inserting data on the old primary > then the correct set of blocks from the tablespace is fetched as well by > pg_rewind. This pat

Re: [bug fix] pg_rewind takes long time because it mistakenly copies data files

2018-02-25 Thread Michael Paquier
On Mon, Feb 26, 2018 at 06:01:43AM +, Tsunakawa, Takayuki wrote: > The cause was that pg_rewind failed to recognize data files in > tablespace directories, resulting in the full copy of those files > instead of WAL replay. Ouch. Confirmed. If I test pg_rewind with a tablespace (primary and s

[bug fix] pg_rewind takes long time because it mistakenly copies data files

2018-02-25 Thread Tsunakawa, Takayuki
Hello, Our customer reported that pg_rewind took many hours to synchronize 400GB of data, even if the new primary doesn't perform any updates. The attached patch fixes that. The cause was that pg_rewind failed to recognize data files in tablespace directories, resulting in the full copy of th