Re: pg_stat_get_backend_subxact() and backend IDs? - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: pg_stat_get_backend_subxact() and backend IDs?
Date
Msg-id 20230824025140.GB1128857@nathanxps13.lan
Whole thread Raw
In response to Re: pg_stat_get_backend_subxact() and backend IDs?  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: pg_stat_get_backend_subxact() and backend IDs?
List pgsql-hackers
On Wed, Aug 23, 2023 at 07:32:06PM -0700, Nathan Bossart wrote:
> On Thu, Aug 24, 2023 at 10:22:49AM +0900, Ian Lawrence Barwick wrote:
>> Looking at the code, this is happening because
>> "pgstat_fetch_stat_local_beentry()"
>> expects to be passed the backend ID as an integer representing a 1-based index
>> referring to "localBackendStatusTable", but "pg_stat_get_backend_subxact()"
>> is presumably intended to take the actual BackendId , as per other
>> "pg_stat_get_XXX()"
>> functions.
> 
> Yes, this was changed in d7e39d7, but 10ea0f9 seems to have missed the
> memo.

BTW I'd argue that this is a bug in v16 that we should try to fix before
GA, so I've added an open item [0].  I assigned it to Robert (CC'd) since
he was the committer, but I'm happy to pick it up.

[0] https://wiki.postgresql.org/wiki/PostgreSQL_16_Open_Items#Open_Issues

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [PoC] pg_upgrade: allow to upgrade publisher node
Next
From: Peter Smith
Date:
Subject: Re: [PoC] pg_upgrade: allow to upgrade publisher node