Re: Bug in pg_get_aios() - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Bug in pg_get_aios()
Date
Msg-id B22A310F-240B-4B2F-98B4-C273FC7DA60C@anarazel.de
Whole thread Raw
In response to Re: Bug in pg_get_aios()  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Hi,

On March 23, 2026 4:44:21 AM EDT, Michael Paquier <michael@paquier.xyz> wrote:
>On Mon, Mar 23, 2026 at 02:30:28PM +0800, Chao Li wrote:
>>> On Mar 23, 2026, at 14:23, cca5507 <cca5507@qq.com> wrote:
>>> If I understand correctly, we want to set nulls[0] to true if owner_pid equals to 0:
>>
>> Indeed an obvious bug.
>
>Or the intention of the code could have been to allow a PID value of 0
>to be exposed, but I don't really buy it.

That certainly wasn't the intent :).

I suspect this is unreachable, we wait for ios before exiting, but of course that doesn't excuse broken code.


>Will fix, thanks for the report.

Thanks!

Andres


--
Sent from my Android device with K-9 Mail. Please excuse my brevity.



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Reduce log level of some logical decoding messages to DEBUG1
Next
From: Bharath Rupireddy
Date:
Subject: Re: Introduce XID age based replication slot invalidation