Re: Fix a wrong comment in UpdateDeadTupleRetentionStatus()

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix a wrong comment in UpdateDeadTupleRetentionStatus()
Date: 2026-11-24 09:25:59
Message-ID: 16B7F8DB-1EAB-4549-A8E7-F4D6809E7816@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 24 Nov 2026, at 10:09, vignesh C <vignesh21(at)gmail(dot)com> wrote:

> While reviewing other work, I noticed a wrong comment in
> UpdateDeadTupleRetentionStatus() in pg_subscription.c, the comment
> above the catalog update says:
> /* Set the subscription to disabled. */
>
> However, the code updates subretentionactive, not subenabled. This
> comment appears to have been copied from DisableSubscription() when
> the function was added.
>
> The attached patch updates the comment to:
> /* Set the dead tuple retention status for the subscription. */

Why not just remove it altogether? The existing comment is wrong, and the
replacement superfluous since it just states what the code does (which is
trivial to see by reading the line in question), not why it does it.

--
Daniel Gustafsson

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexandre Felipe 2026-11-24 09:46:27 Re: pg_regress: schedule multi-line test groups
Previous Message David Geier 2026-11-24 09:19:31 Re: Assert failure in parallel query due to SubPlan double visit for hash join