Re: [BUG] temporary file usage report with extended protocol and unnamed portals

From: Frédéric Yhuel <frederic(dot)yhuel(at)dalibo(dot)com>
To: Sami Imseih <samimseih(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Benoit Lobréau <benoit(dot)lobreau(at)dalibo(dot)com>, Guillaume Lelarge <guillaume(dot)lelarge(at)dalibo(dot)com>, Pierrick Chovelon <pierrick(dot)chovelon(at)dalibo(dot)com>
Subject: Re: [BUG] temporary file usage report with extended protocol and unnamed portals
Date: 2025-04-22 10:43:10
Message-ID: 1ce35b4e-8d37-4b2c-91ef-c70de61e63e6@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4/21/25 07:46, Frédéric Yhuel wrote:
> On 4/20/25 00:42, Sami Imseih wrote:
>>> (In my testing, the "temporary file:" message comes
>>> out without any attached STATEMENT most of the time already, so this
>>> isn't losing much as far as that's concerned.)
>
>
> Indeed, this happens when using autocommit / implicit transactions.

Actually, this also happens with Java-style cursors, i.e. using the
setFetchSize(<count>) method, which pgJDBC converts to using named
portals and EXECUTE <name> <count> protocol messages.

The explanation is probably very similar to the one Sami gave for the
implicit transaction case.

In any case, my v3 patch seems to fix all these cases.

(I'm not saying it's good enough to be committed as is. I think I should
at least add some comments. Anything else?)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-04-22 10:45:55 Re: index prefetching
Previous Message Daniel Gustafsson 2025-04-22 10:10:29 Re: jsonapi: scary new warnings with LTO enabled