public inbox for [email protected]
help / color / mirror / Atom feedFrom: Aditya Toshniwal <[email protected]>
To: Dave Page <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: Regarding multiple result set in query tool
Date: Mon, 29 Sep 2025 14:31:31 +0530
Message-ID: <CAM9w-_nWrSJsBSAggZeGkbbGapwTOx6Qx_dyP9G58QcaMhQq7Q@mail.gmail.com> (raw)
In-Reply-To: <CAM9w-_ka4B7e9hQ1yz5kB3K4u0i1e-=-rHbfjTna7Me4okBU8w@mail.gmail.com>
References: <CAM9w-_mQsC--AfLuEbv0NbW_p_b=PTD0ZbQr8J2Vv=2ioDp_gw@mail.gmail.com>
<CA+OCxowcJNADQdbrzX9qxtOt+8qAS36tcYyE=-tcdQFWGqzVQw@mail.gmail.com>
<CAM9w-_mbXuLXhJKB7KMBvqsCLeKkC2ubcAcxuVq7KR8DzqB_zA@mail.gmail.com>
<CA+OCxozF-kD5=AsuaX10_Kh1sBpM3stSsPC7-RGLYpx=a_ahJQ@mail.gmail.com>
<CAM9w-_mSHJuKE1HJceDOQqxZe1Yq4DaYG6fxMeAooY=8xBvgGA@mail.gmail.com>
<CA+OCxoyO2FNEqa1aw8Czvpjv15qiN5Uk17Sbwc1+2t4B-JTsZA@mail.gmail.com>
<CAM9w-_koTeoUazBctc=cTTEn3HeRE2gYNETNGtJp3ZTr3gLdSw@mail.gmail.com>
<CA+OCxoybXgPbEAK+xdHQyAeFPmwXU+Tb4h0ZNHRPLVvTdtcDBw@mail.gmail.com>
<CAM9w-_ka4B7e9hQ1yz5kB3K4u0i1e-=-rHbfjTna7Me4okBU8w@mail.gmail.com>
Hi,
I raised this to the psycopg team and we may possibly not need to take care
of anything on the pgAdmin side. Check the discussion here -
https://github.com/psycopg/psycopg/discussions/1170
But, I will have to raise a PR to get some extra functions for our use-case.
On Mon, Sep 29, 2025 at 11:23 AM Aditya Toshniwal <
[email protected]> wrote:
> Hi Dave,
>
> On Thu, Sep 25, 2025 at 7:55 PM Dave Page <[email protected]> wrote:
>
>>
>>
>> On Thu, 25 Sept 2025 at 14:44, Aditya Toshniwal <
>> [email protected]> wrote:
>>
>>> Hi Dave,
>>>
>>>>
>>>> If pgAdmin were a single-user application, I'd agree - however it is
>>>> not when running in server mode. Other users will not know what is going on
>>>> if one user exhausts memory.
>>>>
>>> How about allowing multi result sets only for desktop app?
>>>
>>
>> I *really* dislike that. We should support all features in both modes,
>> except where it clearly doesn't make sense.
>>
>>
>>> The problem with memory limits is - it's an extra overhead to keep
>>> checking how much memory is consumed. A row size will depend on the number
>>> of columns and data. If we have a predefined algorithm which will decide
>>> the limits in a performant way is desirable.
>>>
>>
>> Well we can take the extra cycles to compute actual memory usage, or we
>> can just pick an arbitrary number of rows (which as you note, will depend
>> on the schema and data). The former is clearly easier to tune - it could be
>> an arbitrary limit in the config, or it could be computed based on machine
>> resources and utilisation, whilst the latter is always going to be a guess.
>> I'm not sure I see another way. Anyone else?
>>
> For the first approach - python provides a function which we can use. But
> deciding the limit is something tricky. A user may still get out of memory
> error with a limit set. It will all depend on what is running on his
> system. Setting the limit itself is like playing a video game. For the row
> count based limit, we already have a per page limit - and adding more such
> configs will only add more confusion.
>
> import sys
>
> my_tuple = (1, 2, 'hello', 4.5)
> memory_size = sys.getsizeof(my_tuple)
> print(f"The memory size of the tuple is: {memory_size} bytes")
>
>
>> --
>> Dave Page
>> pgAdmin: https://www.pgadmin.org
>> PostgreSQL: https://www.postgresql.org
>> pgEdge: https://www.pgedge.com
>>
>>
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin Hacker | Sr. Staff SDE II | *enterprisedb.com*
> <https://www.enterprisedb.com/;
> "Don't Complain about Heat, Plant a TREE"
>
--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Sr. Staff SDE II | *enterprisedb.com*
<https://www.enterprisedb.com/;
"Don't Complain about Heat, Plant a TREE"
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Regarding multiple result set in query tool
In-Reply-To: <CAM9w-_nWrSJsBSAggZeGkbbGapwTOx6Qx_dyP9G58QcaMhQq7Q@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox