Re: pg_rewind fails on Windows where tablespaces are used

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Alexandra Wang <alexandra(dot)wang(dot)oss(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Chris Travers <chris(dot)travers(at)stormatics(dot)tech>, Farooq Rashed <farooq(dot)rashed(at)desc(dot)gov(dot)ae>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: pg_rewind fails on Windows where tablespaces are used
Date: 2024-10-23 23:03:32
Message-ID: ZxmAxLkKrDxc_0zx@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Oct 23, 2024 at 11:19:14AM -0500, Alexandra Wang wrote:
> I encountered this issue while working on the fix for branch 14 and
> running the tablespace regress test. This simple test is not covered
> in branch 15’s regress tests, as we started setting
> allow_in_place_tablespaces = true since commit d6d317db.

Yes, for the reasons stated in this commit because we rely on
everything to be on the same host, and tablespace paths would overlap
across the primary and its replica.

> I also had to backpatch additional commits for branches 12 to 14, as
> follows:
>
> branch 14: e2f0f8ed, af9e6331, and the commits for branch 15
> [f357233c, c5cb8f3b, 387803d8, and 5fc88c5d53].
> branches 12 & 13: bed90759, 54fb8c7d, de8feb1f, 101c37cd, and the
> commits for branch 14.
>
> With these additional commits for branches 12 to 14, I’m not sure if
> it’s worth backpatching, or should we backpatch only to branch 15?

12 is going to be EOL in a couple of days, so I'd rather leave it out.
If it were down to me, I'd also leave 13 and 14 as well, based on
e2f0f8ed25 to let the beast sleep there. Perhaps others have a
different opinion. though.

> I agree with Andrew that if we decide to backpatch these changes, we
> should add tests for the pg_rewind issue. Would the pg_rewind TAP
> tests be the place for them?

Looking at your patch set, it strikes me as not really necessary to
involve multiple nodes to check the lstat() emulation, the failure
originating not really from pg_rewind, but from the contents of
src/port/. Your DROP TABLESPACE case is telling us that, at least, so
we could use a single node with tablespace manipulations to get
basically to the same coverage? Perhaps pg_checksums is one piece to
look at, as it relies on a single node. And that would be less costly.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tender Wang 2024-10-24 02:04:15 Re: BUG #18568: BUG: Result wrong when do group by on partition table!
Previous Message Alexandra Wang 2024-10-23 16:19:14 Re: pg_rewind fails on Windows where tablespaces are used