Re: Fix incorrect assignment for nodeid in TransactionIdGetCommitTsData()

From: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
To: wangpeng <215722532(at)qq(dot)com>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Fix incorrect assignment for nodeid in TransactionIdGetCommitTsData()
Date: 2026-02-05 15:00:43
Message-ID: CAExHW5tpF_H9qt1Y6+765WBN8FY9sqJXaCswKHU5cybLFTKSLg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 5, 2026 at 9:09 AM wangpeng <215722532(at)qq(dot)com> wrote:
>
> Hi hackers,
>
> This is my first patch

Welcome to the community.

> There is an incorrect assignment of nodeid = 0 in
> TransactionIdGetCommitTsData() (commit_ts.c).
> Elsewhere in the file, the code consistently uses InvalidReplOriginId.
> Even though InvalidReplOriginId also evaluates to 0, it should be used
> here for clarity and consistency.

Few lines below we have a similar assignment which uses
InvalidReplOriginId. I agree with your suggestion. Patch LGTM. It's an
old and small commit so maybe Alvaro, who committed the change
(4aaddf2f009821e29aea3735e44332ad9ca47aaa), may not remember it. Still
including him in case.

--
Best Wishes,
Ashutosh Bapat

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2026-02-05 15:16:20 Re: Pasword expiration warning
Previous Message Greg Sabino Mullane 2026-02-05 15:00:29 Re: client_connection_check_interval default value