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

From: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: [bug fix] pg_rewind takes long time because it mistakenly copies data files
Date: 2018-02-26 06:01:43
Message-ID: 0A3221C70F24FB45833433255569204D1F8D6C7A@G01JPEXMBYT05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 those files instead of WAL replay.

Regards
Takayuki Tsunakawa

Attachment Content-Type Size
pg_rewind_pathcmp.patch application/octet-stream 1.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-02-26 06:23:37 Re: remove pg_class.relhaspkey
Previous Message Tom Lane 2018-02-26 05:45:48 Re: remove pg_class.relhaspkey