From: Andrew Dunstan <andrew@dunslane.net>
To: Michael Paquier <michael@paquier.xyz>
To: Chris Travers <chris.travers@stormatics.tech>
Cc: Farooq Rashed <farooq.rashed@desc.gov.ae>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: pg_rewind fails on Windows where tablespaces are used
Date: Tue, 9 Jul 2024 12:01:17 -0400
Message-ID: <5169f6d5-240e-49ec-9265-ddafa6e863bd@dunslane.net> (raw)
In-Reply-To: <Zl6dsK5IcNGTL0qD@paquier.xyz>
References: <CA+pA0kLc5VxOaO4WfLjmh7W0V+quVvVtT5CaRVRAZMuh0zft4Q@mail.gmail.com>
<Zl6dsK5IcNGTL0qD@paquier.xyz>
On 2024-06-04 Tu 12:53 AM, Michael Paquier wrote:
> On Wed, May 08, 2024 at 03:02:21PM +0700, Chris Travers wrote:
>> Setup is PostgreSQL on Windows with a tablespace on a separate drive. When
>> I go to run pg_rewind it consistently fails with the following error:
> (Chris has poked me regarding this issue last week in Vancouver.)
>
>> pg_rewind: servers diverged at WAL location 39B/7EC6F60 on timeline 2
>> pg_rewind: rewinding from last common checkpoint at 39B/7E8E3F8 on timeline
>> 2
>> pg_rewind: error: file "pg_tblspc/34244696" is of different type in source
>> and target
>>
>> The file is confirmed to be a JUNCTION to the correct location on both the
>> source and target. So the error looks like a problem interacting with
>> Windows and detecting JUNCTION types in this case.
An EDB customer has encountered the same issue. They are not using
in-place tablespaces.
I have reproduced this problem on release 15, not using an in-place
tablespace.
The solution I came up with was to backpatch commits c5cb8f3b, 387803d8
and 5fc88c5d53.
I don't think we need to do anything relating to in-place tablespaces.
These are documented as a developer only option and not for production.
The only question in my mind is whether those patches should be
backpatched. It's a couple of hundred lines, and I think it's safe, but
I'd welcome other opinions. If we are going to backpatch them we should
also look at adding to adding tests for use of tablespaces with
pg_rewind on the back branches. Ideally we'd get this done in time for
the next maintenance release.
cheers
andrew
--
Andrew Dunstan
EDB:https://www.enterprisedb.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: andrew@dunslane.net, michael@paquier.xyz, chris.travers@stormatics.tech, farooq.rashed@desc.gov.ae, pgsql-bugs@lists.postgresql.org
Subject: Re: pg_rewind fails on Windows where tablespaces are used
In-Reply-To: <5169f6d5-240e-49ec-9265-ddafa6e863bd@dunslane.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox