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 1uw9lf-006ezQ-5Y for pgsql-general@arkaria.postgresql.org; Wed, 10 Sep 2025 01:37:04 +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 1uw9ld-00FxWJ-VP for pgsql-general@arkaria.postgresql.org; Wed, 10 Sep 2025 01:37:02 +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 1uw9ld-00FxW9-GI for pgsql-general@lists.postgresql.org; Wed, 10 Sep 2025 01:37:02 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uw9lb-001ZYN-36 for pgsql-general@postgresql.org; Wed, 10 Sep 2025 01:37:00 +0000 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-622b4b14a75so8431309a12.1 for ; Tue, 09 Sep 2025 18:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757468218; x=1758073018; 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=qT9/z2glLnrSezRYl43wWmOhI/c5MX1WmSCDAGCS+Qk=; b=WK4BCbdXbVY6oX7oAQzGni4+bKRFF/5EdYvy/6BAR1CjAe0mGbfyxt9QnrFkPRI9HY lX8i8egHjY8LYRn5NBladMEnks2g5NiWqiHp/YFouWwC4+m72xNpZ53MSDkVy4dwch01 0D1GADAP4Pa48Sqz1xOom3gBf/GGAm3eewaC2XXSLCbMv9G2CEb1POs5xIFVgD7Re5o0 QdA7085jXxZ4M2tz5v8HBE7DckeZbj7nZlR8r7KDOw6nWzsHRwH2FwNNY+O8tzgDWQ0F lanxyIDIWApl07f85/ZdK9u/MQ0vrppfuPOakQT19VZXALmtrHDeTsrVaVAVHIuvvwj7 qFpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757468218; x=1758073018; 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=qT9/z2glLnrSezRYl43wWmOhI/c5MX1WmSCDAGCS+Qk=; b=Y3PUtleDXwrjwgRxa7FDi9CQEELy7lKMbH502M9SH8c/Y1AwVqMKqjsIZqbyPdjUxS +YBrovC7WQfEBlGVL0ndLE9yHyCNtIUjWDdA1yd8oZE/Niy+clqx3I/A5wqij+5CaREL ls7fjUwONTakPnWKgDhjM6mL6KXn1kyr2O0k2MCCV/5E+ZMTLyEYG4BGltBg6mi+S/vB fAyaKOW544GSTtZaTI2mopM41bWxrCUPcAiokmNmNO2NvoNFOKxjSLRFCooTEOMnJGsE zLPRTuo+Xt0QadXb6FD6lunFzAV5kD6Dak9EuNcA6T0FztYznHdAxZ944g2/msMzIlh8 Yc6Q== X-Gm-Message-State: AOJu0YyE+DJkytR7Mv3pqAlRPRcHc0qi4YJhdXXe2PdUt4bzzHCxMadV cvJap9BagvuWyQZJSA1hCXBXbhuB0/pWrVUru5ad2g7x8b4CzUBD9qcTj+rRSd9z+90YUrqIDjJ 22lNrdfkCWnnfTn79qHiglvudfgC0xAUg5NIz X-Gm-Gg: ASbGncsqH5VOuH2MJ964dEYIIhM1sHboKpFfX1q2PkWFNDCshGyhx5yknSW2QGOZgzL RvpehwK/RS81/sAus51oboGYc4FfOOqEObPNpjPe0ZkEuiWkog1dcQLs9ElbVE9v5T5uOGp2kS4 oCDx97alFqFtz207wbalJiUsv4KJlruxs93+l0m6fmOn7/hssu9V87sMiUe3mIX3ZxymbIrg/7X 9V+FzLBQI5FKi6Pyncl X-Google-Smtp-Source: AGHT+IEc8qTXEP94NnfErMeJJjB5lzA57oAs6PiR7PFbx53TJG38Gqnz/aRWSVjAyAYt1YuIe/IlRTRdN+m/Fc2uQB0= X-Received: by 2002:a05:6402:3514:b0:628:f072:2f18 with SMTP id 4fb4d7f45d1cf-628f07235eemr8185724a12.3.1757468218278; Tue, 09 Sep 2025 18:36:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Justin Date: Tue, 9 Sep 2025 21:36:46 -0400 X-Gm-Features: AS18NWCEZjXjJ1GRjiSX7Mw29jZcevcPXF8d_cprCHcBiaBe8qmhnhZEd2-5HDc Message-ID: Subject: Re: MVCC and all that... To: Ron Johnson Cc: pgsql-general Content-Type: multipart/alternative; boundary="000000000000dac784063e6874b1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000dac784063e6874b1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 9, 2025 at 9:12=E2=80=AFPM Ron Johnson wrote: > On Tue, Sep 9, 2025 at 8:41=E2=80=AFPM Justin wrot= e: > >> >> XID being 32 bit >> > > Would converting them to 64 bits require changing the on-disk structure o= f > database files? > Yes this is one of the reasons 64 bit xid has not be used yet. pg_upgrade is not an option as the database must be reloaded. > > >> anonymous functions in PG have several limitation not just input >> arguments (not sure i see the need for that) >> > > Aren't transience and "ad hockery" the whole point of anonymous > procedures? Thus, I don't see the point of passing them parameters, eith= er. > I agree. It would be nice to be able to return a result. I cheat using RAISE NOTICE to get something back.. > > >> Temporary tables are a pain and cause issues for big databases >> > > I'd like to see GLOBAL TEMPORARY tables. Each connection gets its own > private copy of the table, so that applications don't need to carry aroun= d > CREATE TEMPORARY TABLE code with them. > > Temporary tables implementation is not optimal, In most cases I am able to remove temp tables with better SQL, that does not require intermediate temp tables to hold result sets that are used later in the logic. The SQL is harder to write and understand . Thanks Justin --000000000000dac784063e6874b1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Sep 9, = 2025 at 9:12=E2=80=AFPM Ron Johnson <ronljohnsonjr@gmail.com> wrote:
On Tue, = Sep 9, 2025 at 8:41=E2=80=AFPM Justin <zzzzz.graf@gmail.com> wrote:

XID being 32 bit=C2=A0
=
Would converting them to 64 bits require changing the on-dis= k structure of database files?
=C2=A0
Yes this is one of the reasons 64 bit xid has not be used yet.=C2= =A0 pg_upgrade is not an option=C2=A0 as the database must be reloaded.=C2= =A0
=C2=A0
=C2=A0
anonymous functi= ons in PG have several limitation not just input arguments=C2=A0(not sure i= see the need for that)=C2=A0

Aren't transience and "ad hockery" the whole point of anon= ymous procedures?=C2=A0 Thus, I don't see the point of passing them par= ameters, either.

I agree.=C2=A0 =C2= =A0It would be nice to be able to return a result.=C2=A0 I cheat using RAIS= E NOTICE to get something back..
=C2=A0
<= div>=C2=A0
Temporary tables are a pain and cause issues for big database= s

I'd like to see GLOBA= L TEMPORARY tables.=C2=A0 Each connection gets its own private copy of the = table, so that applications don't need to carry around CREATE TEMPORARY= TABLE code with them.

Temporary tables implementation is not optimal,=C2=A0 In most = cases I am able to remove temp tables with better SQL, that does not requir= e intermediate temp tables to hold result sets that=C2=A0are used later=C2= =A0in the logic.=C2=A0 The SQL=C2=A0is harder to=C2=A0write and understand = .=C2=A0=C2=A0
=C2=A0
Thanks=C2=A0
Justin
= --000000000000dac784063e6874b1--