Re: Conflict detection for update_deleted in logical replication

From: shveta malik <shveta(dot)malik(at)gmail(dot)com>
To: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, shveta malik <shveta(dot)malik(at)gmail(dot)com>
Subject: Re: Conflict detection for update_deleted in logical replication
Date: 2025-06-25 06:57:28
Message-ID: CAJpy0uAg1mTcy00nR=VAx1nTJYRkQF84YOY4_YKh8L53A1t6sA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> Here is the V41 patch set which includes the following changes:
>

Thanks for the patches. Few trivial things:

1)
In ReplicationSlotAcquire(), does it make more sense to move the error
after checking the slot's existence first? If a user is trying to use
a slot which does not exist, he should first get that error instead of
'slot is reserved' error.

2)
When max_replication_slots limit is reached and user is trying to
enable rci for the first time, launcher will give error in log file:

ERROR: all replication slots are in use
HINT: Free one or increase "max_replication_slots".
LOG: background worker "logical replication launcher" (PID 13147)
exited with exit code 1

It is not clear from this message as to what launcher was actually
trying to create. A log-msg in CreateConflictDetectionSlot() saying
"Creating conflict-detection slot" may help here.

thanks
Shveta

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2025-06-25 06:59:19 Re: Simplify VM counters in vacuum code
Previous Message Bertrand Drouvot 2025-06-25 06:50:50 Re: POC: enable logical decoding when wal_level = 'replica' without a server restart