Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v36pX-00BfMa-EB for pgadmin-hackers@arkaria.postgresql.org; Mon, 29 Sep 2025 05:53:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1v36pT-00Gs3B-FD for pgadmin-hackers@arkaria.postgresql.org; Mon, 29 Sep 2025 05:53:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v36pT-00Gs31-3F for pgadmin-hackers@lists.postgresql.org; Mon, 29 Sep 2025 05:53:43 +0000 Received: from mail-vk1-xa2a.google.com ([2607:f8b0:4864:20::a2a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v36pP-000SCM-2T for pgadmin-hackers@postgresql.org; Mon, 29 Sep 2025 05:53:41 +0000 Received: by mail-vk1-xa2a.google.com with SMTP id 71dfb90a1353d-54aa0792200so2835613e0c.3 for ; Sun, 28 Sep 2025 22:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1759125219; x=1759730019; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cdQoTmJhS9+5iSc07ibu07Ck0VPIJeRjKPJS2JeURzs=; b=VO8ms9B2n133J5svH/nov1nbBElRJBrZTtA9uY0LZHmcDOGdWQgZ2nS1NXP15uj8UY 7QsHahDOeMjBjExwF50ni5G2Cms+8FS5apMCxBnHlGKCa+0mpegTR0CBfLTA2f7tRHPZ bQpB+oy2TNoaqdu6Bz3W+qZVeHZ+OwzvW2+cmpeaNrgJ34O4Pc3WMxXlvtrthF3wsx67 ay1XVMsJo4DIOfBnYomsKL1330c8NFtZ9ZK9/wT21CCEbgpwdx2FWp9I63xv42yZFRKE /3JoZaUK3S9zL5B3ezns7Q6PEnAfNIU5IlbkUDXvOkez+DvC+tA7dwh4yeT0x6KwQy1o PBqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759125219; x=1759730019; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cdQoTmJhS9+5iSc07ibu07Ck0VPIJeRjKPJS2JeURzs=; b=Am3/uzwCl6c2f1/CeCERUMM/0W1lHW8hAdRVCeWynlZXihD8TQZYZdtX4G7w1LH4kz HtYC51Uyczb+KnEErPKum2PCzZfPpag/keEzbI1zus3OKPDONn3m7pRXXf8499UfOXQx 4PVKhWPOj16J9GbIXP2pKfBRsMKeDybvysrgFnWVdvIdJm7U25JK9OdAa5kr9KJt+Y1O ePD9Zaq1zuNjGcjKz0SFfvrUU2TDC2NR4udxY2DfupiWExzZq9L0bj/8EJyXHcciboOY xnRPiFiaPy5kdsif84is5XI9UdVhr6LreJwEY/3pgL95Bp3XlRwOAEXteP04GJDhMzHU Jtrg== X-Gm-Message-State: AOJu0YyQXkxbd5mmoGNrYZ7KptzPgY+z+a8hB3J1RDoA/HIVjd2aWoHb 5oqygZkjbbkK7zFAE7gIvsoWKyZ3jqW8vIT8kUGNo4Rh3NO6BRuune2uNukZ2Oew7l+q7EWn1tj a8xpdUfQgQz1YaZXSiTQCR+8KqrlgtvU4NvP/Hv8MCffwzfq6ZFauaQ== X-Gm-Gg: ASbGnctKE5E3sC2ZJ8KrzDxgkBquwjoGhngWW04+A3mLlCgwObvNmu1IhgoPXTp50Qq stUhA8p1YoAyL1ZzBnW8f4GS8FKxreXxpLI4NY+v5NaZvXjAHG0q5AilJmT6JoSwwuozxKrUfJv PFpLPDU3XdLwpJLR1xxxObN57E8zCphl/8c/vRYyARRqJqlOLydJF7zO7ogufIeue62LPgZa7k6 bMBPe4FBisuTjhvB15e X-Google-Smtp-Source: AGHT+IFbXDCLL3uQqHxEvqj4ZJo5A/qIaQh1j/yDUM1bOc/yLcBbsHeFVysT7V2ns4rzeJkGZN7NYdD3n3qiAjwb3Vs= X-Received: by 2002:a05:6122:da3:b0:539:3bb5:e4d6 with SMTP id 71dfb90a1353d-54bfd100e6dmr764397e0c.1.1759125219234; Sun, 28 Sep 2025 22:53:39 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Mon, 29 Sep 2025 11:23:12 +0530 X-Gm-Features: AS18NWAaryn3Z15w-0fS_A2HwjSQuKIA2tkBNi7l01Rhpfftg69tU-hLlt4wpPU Message-ID: Subject: Re: Regarding multiple result set in query tool To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000cef4d0063fea41ab" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000cef4d0063fea41ab Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Dave, On Thu, Sep 25, 2025 at 7:55=E2=80=AFPM Dave Page wrote= : > > > On Thu, 25 Sept 2025 at 14:44, Aditya Toshniwal < > aditya.toshniwal@enterprisedb.com> wrote: > >> Hi Dave, >> >>> >>> If pgAdmin were a single-user application, I'd agree - however it is no= t >>> 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 numb= er >> 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 machin= e > resources and utilisation, whilst the latter is always going to be a gues= s. > 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 =3D (1, 2, 'hello', 4.5) memory_size =3D 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 > > --=20 Thanks, Aditya Toshniwal pgAdmin Hacker | Sr. Staff SDE II | *enterprisedb.com* "Don't Complain about Heat, Plant a TREE" --000000000000cef4d0063fea41ab Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Dave,


import sys

my_tuple =3D (1, 2, 'hello'= , 4.5)
memory_size =3D sys.getsizeof(my_tuple)
print(f"The memory size of the tuple is: {memory_size} = bytes")=C2=A0



--
Thanks,
Aditya Toshniw= al
pgAdmin Hacker=C2=A0| Sr. Staff SDE II=C2= =A0| enterprisedb.com
"Don't Complain about Heat, Plant a TREE"
--000000000000cef4d0063fea41ab--