Re: Add a property to automatically suspend portals as they produce given number of bytes

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add a property to automatically suspend portals as they produce given number of bytes
Date: 2025-01-17 12:22:18
Message-ID: CAB=Je-HcnC=e80gFQdj1bMsA9v31xcsY-tT=JGuoJtFMOxbfXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kirill,

cursor does not provide a way to limit the fetch size based on the memory
consumption.
Imagine a table like (id int8, value jsonb).
If we use "fetch 1000", then it might require 1GiB on the client if every
row contains 1MiB json.
If the client plays defensively and goes for "fetch 10", it might take a
lot of time if jsons are small.

Neither cursor nor extended protocol solve the problem.

Vladimir

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amul Sul 2025-01-17 12:50:15 Re: NOT ENFORCED constraint feature
Previous Message Richard Guo 2025-01-17 12:19:43 Re: Eager aggregation, take 3