From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Prevent archive recovery from scanning non-existent WAL files. |
Date: | 2020-04-07 16:38:02 |
Message-ID: | CAHGQGwGvtzUeMxNUxUJc2d+6FQgJdJ2r_BL3J_n948_OAmhzmg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Wed, Apr 8, 2020 at 1:36 AM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> Prevent archive recovery from scanning non-existent WAL files.
>
> Previously when there were multiple timelines listed in the history file
> of the recovery target timeline, archive recovery searched all of them,
> starting from the newest timeline to the oldest one, to find the segment
> to read. That is, archive recovery had to continuously fail scanning
> the segment until it reached the timeline that the segment belonged to.
> These scans for non-existent segment could be harmful on the recovery
> performance especially when archival area was located on the remote
> storage and each scan could take a long time.
>
> To address the issue, this commit changes archive recovery so that
> it skips scanning the timeline that the segment to read doesn't belong to.
>
> Author: Kyotaro Horiguchi, tweaked a bit by Fujii Masao
> Reviewed-by: David Steele, Pavel Suderevsky, Grigory Smolkin
> Discussion: https://postgr.es/m/16159-f5a34a3a04dc67e0@postgresql.org
> Discussion: https://postgr.es/m/20200129.120222.1476610231001551715.horikyota.ntt@gmail.com
>
> Branch
> ------
> master
>
> Details
> -------
> https://git.postgresql.org/pg/commitdiff/4bd0ad9e44be9fbc3ad77747d7672dab1c3df7d9
>
> Modified Files
> --------------
> src/backend/access/transam/xlog.c | 27 ++++++++++++++++++++++++++-
> 1 file changed, 26 insertions(+), 1 deletion(-)
Sorry, since I mistakenly canceled the commit message when I pushed
this commit, it was not sent to pgsql-committers. So I posted it manually.
Sorry for my mistake.
Regards,
--
Fujii Masao
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2020-04-07 16:44:26 | Re: pgsql: Generate backup manifests for base backups, and validate them. |
Previous Message | Fujii Masao | 2020-04-07 16:36:19 | pgsql: Prevent archive recovery from scanning non-existent WAL files. |