Re: [PATCH] Fix leaked hash scans in pg_listening_channels()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Joel Jacobson" <joel(at)compiler(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Fix leaked hash scans in pg_listening_channels()
Date: 2026-10-25 18:30:33
Message-ID: 344904.1792953033@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Joel Jacobson" <joel(at)compiler(dot)org> writes:
> I found a hash scan leak in pg_listening_channels(), introduced by
> 282b1cde9d.

Good catch.

> Attached patch uses InitMaterializedSRF() to complete the scan
> before returning rows, following 257c8231bf.

I am wondering why you used MAT_SRF_USE_EXPECTED_DESC?
AFAICT that's only needed in functions returning "setof record",
and with a fixed output type it's usual to just pass flags = 0.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-10-25 18:42:52 Re: [PATCH] Fix leaked hash scans in pg_listening_channels()
Previous Message David Steele 2026-10-25 18:01:09 Re: Avoid truncated or zero-padded copies of replaced files in backups.