Re: pgsql: Prevent invalidation of newly synced replication slots. - Mailing list pgsql-hackers

From Robert Haas
Subject Re: pgsql: Prevent invalidation of newly synced replication slots.
Date
Msg-id CA+TgmoYvtJoU0eyw3XEmLLda_JV4qSJxJpVfoTtFL3uPs5+7vw@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Prevent invalidation of newly synced replication slots.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Prevent invalidation of newly synced replication slots.
Re: pgsql: Prevent invalidation of newly synced replication slots.
List pgsql-hackers
On Tue, Jan 27, 2026 at 10:11 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > On Tue, Jan 27, 2026 at 12:56 AM Amit Kapila <akapila@postgresql.org> wrote:
> >> Prevent invalidation of newly synced replication slots.
>
> > This commit has broken CI for me.
>
> Hmm, I wonder why the buildfarm seems fine with it ... I'm prepared
> to believe a Windows-only problem, but at least hamerkop has run
> since 851f664.

I don't understand it, either. There's a bunch of error codes that we
map to EACCES in _dosmaperr, but I don't know why any of those
problems would have occurred here:

ERROR_ACCESS_DENIED, EACCES
ERROR_CURRENT_DIRECTORY, EACCES
ERROR_LOCK_VIOLATION, EACCES
ERROR_SHARING_VIOLATION, EACCES
ERROR_NETWORK_ACCESS_DENIED, EACCES
ERROR_CANNOT_MAKE, EACCES
ERROR_FAIL_I24, EACCES
ERROR_DRIVE_LOCKED, EACCES
ERROR_SEEK_ON_DEVICE, EACCES
ERROR_NOT_LOCKED, EACCES
ERROR_LOCK_FAILED, EACCES

(Side note: Wouldn't it make a lot of sense to go back and kill
_dosmaperr in favor of display the actual Windows error code string?)

What's also puzzling is that what this test is doing seems to be
totally standard. 040_standby_failover_slots_sync.pl does this:

my $standby1 = PostgreSQL::Test::Cluster->new('standby1');
$standby1->init_from_backup(
        $primary, $backup_name,
        has_streaming => 1,
        has_restoring => 1);

And 046_checkpont_logical_slot.pl does this:

my $standby = PostgreSQL::Test::Cluster->new('standby');
$standby->init_from_backup(
    $primary, $backup_name,
    has_streaming => 1,
    has_restoring => 1);

So why is 046 failing and 040 is fine? I have no idea.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Prevent invalidation of newly synced replication slots.
Next
From: Robert Haas
Date:
Subject: Re: pg_waldump: support decoding of WAL inside tarfile