Re: [BUG] temporary file usage report with extended protocol and unnamed portals - Mailing list pgsql-hackers

From Frédéric Yhuel
Subject Re: [BUG] temporary file usage report with extended protocol and unnamed portals
Date
Msg-id f40c6ac6-1358-4a59-bfd4-ebb7427e7497@dalibo.com
Whole thread Raw
In response to Re: [BUG] temporary file usage report with extended protocol and unnamed portals  (Sami Imseih <samimseih@gmail.com>)
Responses Re: [BUG] temporary file usage report with extended protocol and unnamed portals
Re: [BUG] temporary file usage report with extended protocol and unnamed portals
List pgsql-hackers

On 4/22/25 19:37, Sami Imseih wrote:
> the patch relies on looking up queryDesc->sourceText inside DropPortal,
> which Tom raised concerns about earlier in the thread [0]

Yes, I think I had misunderstood what Tom said. Thank you for pointing 
that out.

However, is it really unsafe?

In exec_bind_message, the portal's query string comes from a duplicate 
of the original string (see CreateCachedPlan). So we are safe in this case.

In exec_simple_query, the portal is dropped towards the end of this 
function, so we are safe here too.

Am I missing something?



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add Pipelining support in psql
Next
From: Bertrand Drouvot
Date:
Subject: Avoid core dump in pgstat_read_statsfile()