pg_rewind fails on Windows where tablespaces are used

From: Chris Travers <chris(dot)travers(at)stormatics(dot)tech>
To: Farooq Rashed <farooq(dot)rashed(at)desc(dot)gov(dot)ae>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: pg_rewind fails on Windows where tablespaces are used
Date: 2024-05-08 08:02:21
Message-ID: CA+pA0kLc5VxOaO4WfLjmh7W0V+quVvVtT5CaRVRAZMuh0zft4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

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:

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.

I came across the following which looks like it would fix this problem but
don't have a proper build environment. Please consider backporting the fix
at least as far as Postgres 15 as this bug fix does apply to non-in-place
tablespaces on Windows. The thread is
https://postgrespro.com/list/thread-id/2657122

Best Regards,
Chris Travers

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2024-05-08 13:55:50 Re: BUG #18348: Inconsistency with EXTRACT([field] from INTERVAL);
Previous Message jian he 2024-05-08 01:03:56 Re: BUG #18348: Inconsistency with EXTRACT([field] from INTERVAL);