pg_rewind and xlogtemp files

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_rewind and xlogtemp files
Date: 2015-06-17 06:17:37
Message-ID: CAB7nPqT=nPzXseCyrJ-yvKvE-Q+vC42Cc1VvGcdsEiWb0AZL1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

I just bumped into this report regarding pg_rewind, that impacts as
well the version shipped in src/bin/pg_rewind:
https://github.com/vmware/pg_rewind/issues/45

In short, the issue refers to the fact that if the source server
filemap includes xlogtemp files pg_rewind will surely fail with
something like the following error:

error reading xlog record: record with zero length at 1/D5000090
unexpected result while fetching remote files: ERROR: could not open
file "pg_xlog/xlogtemp.23056" for reading: No such file or directory

The servers diverged at WAL position 1/D4A081B0 on timeline 174.
Rewinding from Last common checkpoint at 1/D30A5650 on timeline 174

As pointed by dev1ant on the original bug report, process_remote_file
should ignore files named as pg_xlog/xlogtemp.*, and I think that this
is the right thing to do. Any objections for a patch that at the same
time makes "xlogtemp." a define declaration in xlog_internal.h?

Regards,
--
Michael

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2015-06-17 06:24:38 Re: checkpointer continuous flushing
Previous Message CPT 2015-06-17 05:58:21 Feature Request: bigtsvector