Remove stale XXX comment in logical launcher
Hi,
I noticed one comment in the launcher that can be removed:
if (!retain_dead_tuples)
/* XXX unclear why we don't request logical decoding disable */
ReplicationSlotDropAcquired(false);
Since the conflict detection slot is a physical one, there is no logical
decoding state to disable when dropping it. The condition it depends on is also
self-evident from the surrounding code and the block comment above, which
already explains why the slot is dropped. So here is a patch to remove the XXX
comment.
Best Regards,
Zhijie Hou
On Thu, Sep 3, 2026 at 9:12 AM Zhijie Hou (Fujitsu)
<houzj.fnst@fujitsu.com> wrote:
Hi,
I noticed one comment in the launcher that can be removed:
if (!retain_dead_tuples)
/* XXX unclear why we don't request logical decoding disable */
ReplicationSlotDropAcquired(false);Since the conflict detection slot is a physical one, there is no logical
decoding state to disable when dropping it.
I agree. However, the comments never mention that this is a physical
slot, making it easy to misconstrue it as a logical one. Do you think
we can add the keyword 'physical' in the comment above this Drop()
or/and above CreateConflictDetectionSlot or/and above macro
CONFLICT_DETECTION_SLOT?
Show quoted text
The condition it depends on is also
self-evident from the surrounding code and the block comment above, which
already explains why the slot is dropped. So here is a patch to remove the XXX
comment.
On Thu, Sep 3, 2026 at 11:56 AM shveta malik <shveta.malik@gmail.com> wrote:
On Thu, Sep 3, 2026 at 9:12 AM Zhijie Hou (Fujitsu)
<houzj.fnst@fujitsu.com> wrote:Hi,
I noticed one comment in the launcher that can be removed:
if (!retain_dead_tuples)
/* XXX unclear why we don't request logical decoding disable */
ReplicationSlotDropAcquired(false);Since the conflict detection slot is a physical one, there is no logical
decoding state to disable when dropping it.I agree. However, the comments never mention that this is a physical
slot, making it easy to misconstrue it as a logical one. Do you think
we can add the keyword 'physical' in the comment above this Drop()
or/and above CreateConflictDetectionSlot or/and above macro
CONFLICT_DETECTION_SLOT?
Adding such a comment at the time of creation sounds reasonable to me.
I would still like to check with Alvaro who added this comment in
commit 2af1dc89282bea681201cf66e2bb32537294e623 whether such a comment
would make it easier to follow this part of code?
--
With Regards,
Amit Kapila.
On 2026-Sep-03, Amit Kapila wrote:
On Thu, Sep 3, 2026 at 11:56 AM shveta malik <shveta.malik@gmail.com> wrote:
I agree. However, the comments never mention that this is a physical
slot, making it easy to misconstrue it as a logical one. Do you think
we can add the keyword 'physical' in the comment above this Drop()
or/and above CreateConflictDetectionSlot or/and above macro
CONFLICT_DETECTION_SLOT?Adding such a comment at the time of creation sounds reasonable to me.
I would still like to check with Alvaro who added this comment in
commit 2af1dc89282bea681201cf66e2bb32537294e623 whether such a comment
would make it easier to follow this part of code?
I agree that having a comment stating that the slot we hold is
necessarily physical would be good. It wouldn't hurt to see exactly
what is being proposed though.
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"[PostgreSQL] is a great group; in my opinion it is THE best open source
development communities in existence anywhere." (Lamar Owen)
Hi,
On Friday, September 4, 2026 2:12 AM Álvaro Herrera <alvherre@kurilemu.de> wrote:
On 2026-Sep-03, Amit Kapila wrote:
Adding such a comment at the time of creation sounds reasonable to me.
I would still like to check with Alvaro who added this comment in
commit 2af1dc89282bea681201cf66e2bb32537294e623 whether such a
comment would make it easier to follow this part of code?I agree that having a comment stating that the slot we hold is necessarily
physical would be good. It wouldn't hurt to see exactly what is being
proposed though.
Thanks for confirming.
Here is the updated patch with the suggested comments.
Best Regards,
Zhijie Hou
Hello,
On 2026-Sep-07, Zhijie Hou (Fujitsu) wrote:
Here is the updated patch with the suggested comments.
Mumble.
How about like this?
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
On Tue, Sep 8, 2026 at 1:20 PM Álvaro Herrera <alvherre@kurilemu.de> wrote:
On 2026-Sep-07, Zhijie Hou (Fujitsu) wrote:
Here is the updated patch with the suggested comments.
Mumble.
How about like this?
LGTM. Do let me know if you would like me to push, otherwise, I would
be happy if you can take care of it.
--
With Regards,
Amit Kapila.
On 2026-Sep-09, Amit Kapila wrote:
LGTM. Do let me know if you would like me to push, otherwise, I would
be happy if you can take care of it.
Thanks for looking! I have pushed it. Thanks Hou for reporting.
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
Al principio era UNIX, y UNIX habló y dijo: "Hello world\n".
No dijo "Hello New Jersey\n", ni "Hello USA\n".