Re: walsender: Assert MyReplicationSlot is set before use - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: walsender: Assert MyReplicationSlot is set before use
Date
Msg-id CAHGQGwFYFgmfRBVkYcJen1AM-pA=iRDwGEhkwEVkz-2Wa8aEFw@mail.gmail.com
Whole thread Raw
In response to Re: walsender: Assert MyReplicationSlot is set before use  (Chao Li <li.evan.chao@gmail.com>)
Responses Re: walsender: Assert MyReplicationSlot is set before use
List pgsql-hackers
On Tue, Feb 3, 2026 at 12:38 PM Chao Li <li.evan.chao@gmail.com> wrote:
> > I think we cannot assume the slot type here. A suitable checking might
> > be: If a physical slot was acquired during logical replication, report an error,
> > just like we do in StartReplication().
>
> Good point. In StartReplication(), we check MyReplicationSlot is not logical, correspondingly, in
StartLogicalReplication(),we should check MyReplicationSlot is not physical. 

StartLogicalReplication() calls CreateDecodingContext() after
ReplicationSlotAcquire(), and CreateDecodingContext() seems to
already perform this check. Isn't that sufficient?

Regards,


--
Fujii Masao



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add expressions to pg_restore_extended_stats()
Next
From: Peter Smith
Date:
Subject: Re: [WIP]Vertical Clustered Index (columnar store extension) - take2