Re: pg_rewind fails on Windows where tablespaces are used
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Michael Paquier <michael@paquier.xyz>,
Alexandra Wang <alexandra.wang.oss@gmail.com>, Chris Travers <chris.travers@stormatics.tech>,
Farooq Rashed <farooq.rashed@desc.gov.ae>, pgsql-bugs@lists.postgresql.org
Date: 2025-01-09T03:38:54Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix readlink() for non-PostgreSQL junction points on Windows.
- 2c4a532c96a9 13.19 landed
- f4fd5325cc87 14.16 landed
- 9b136b0f2e53 15.11 landed
-
Fix stat() for recursive junction points on Windows.
- fbf8efbda88c 13.19 landed
- 9f1c67488e59 14.16 landed
- e708f31881fd 15.11 landed
-
Fix pg_rewind with in-place tablespaces when source is remote
- bf227926d22b 17.0 cited
-
Make unlink() work for junction points on Windows.
- f357233c9db8 16.0 cited
-
Use in-place tablespaces in regression test.
- d6d317dbf615 15.0 cited
On Thu, Jan 9, 2025 at 3:45 AM Andrew Dunstan <andrew@dunslane.net> wrote:
> Those patches didn't actually include any tests. I guess the best test
> would be to create a chain of several junction points and then run
> initdb on the leaf of the chain?
Yeah I think the three interesting cases were initdb when run under
junctions like these:
1. Volume GUID format: mklink /J foo \\?\Volume{12341234-1234...},
expected to break without patch
2. Chain: mklink /J C:\\aaa1 C:\\aaa2, mkdir /J C:\\aaa2 c:\\aaa3,
expected to break without patch
3. Chain of length > 8, expected to fail with ELOOP once the patch is applied.
(Syntax may be off, I just googled it but don't have Windows to try).
The way to get decent tests for this stuff and all the rest of the
wrappers would probably be to develop this test suite further:
https://www.postgresql.org/message-id/flat/CA%2BhUKG%2BajSQ_8eu2AogTncOnZ5me2D-Cn66iN_-wZnRjLN%2Bicg%40mail.gmail.com