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 1r7Jjj-004yHf-EZ for pgsql-hackers@arkaria.postgresql.org; Sun, 26 Nov 2023 18:20:07 +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 1r7Jji-0094NR-02 for pgsql-hackers@arkaria.postgresql.org; Sun, 26 Nov 2023 18:20:06 +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 1r7Jjh-0094MT-Ln for pgsql-hackers@lists.postgresql.org; Sun, 26 Nov 2023 18:20:05 +0000 Received: from mail-yb1-xb31.google.com ([2607:f8b0:4864:20::b31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1r7Jjb-007TiZ-0m for pgsql-hackers@lists.postgresql.org; Sun, 26 Nov 2023 18:20:04 +0000 Received: by mail-yb1-xb31.google.com with SMTP id 3f1490d57ef6-daf2eda7efaso3079162276.0 for ; Sun, 26 Nov 2023 10:19:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701022798; x=1701627598; darn=lists.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=nqj4YiUGo70LHC+50Pp11cDzo9aZjAmAyazb+0RIUcA=; b=N82VyTvof84cXUq0FkJdjJlQFRp8wdGp6HSH42B+Cg9euUQ6YBKCo859BwepGzF7wW xb/6IgwbTs/IoaUoT+0q0EtnOZ7k1gBpuWJxWL6iTgueBDSF4qWYjQKmb3qJ80YwbAsF fabQYSOdi8TCNVLiRuTtlARrtmewjSsinCmTNaXDWehx5xHCoqlrEdmBulPaIuffLNp9 K4RIIj9HBXeV1wxSXR4CZO/k1pTsUJcP9Rx9m8V4bk2MKAhm4q5odapx4gCP7zIWuPdD yKpNimS6skUNFQ9g4KCsK8HmesXn3MeeTnS9mik+WcCaDpHojuhJYWahUEWS/UJJwnQc Agyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701022798; x=1701627598; 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=nqj4YiUGo70LHC+50Pp11cDzo9aZjAmAyazb+0RIUcA=; b=L8gRqAtzLluN9JdGPtshQmrPw8EbTEfhU3Fj+yVJ/viZw3i/HMmTbp+FFJpi8bC4PY UsOHZQ6gCQGrcqSWSi/O+tS4Z+9ym0XbvqcWeKNfD8iBKIG+G7S8yhQefDe2ZadC89Ko FMIkAQGkhgVBXG2gOKLVqrqJn/t8uNLZUeetrMtyGdkYX1PhhUAkdPy08EXn8TTr8M49 8NkDBWG5Y2Qy72G+N19mEJXZHc8SQE++UO2EAclijaTtH/Gf0zUTzyVmJu1W8thwEJab Xe3/V7ygzhnV4v2WA0X6WZORYoDR5r6Bb/sfGTO5t6bPVsEmcueddBV9Ozb2yTXugAly Iotg== X-Gm-Message-State: AOJu0YxAk2z1EzJDrIY9eBIqocZpVfTaLOYoJF2UaRnMpZLe3i2bI2J7 TSsY6Yo9/sEfpmlTWO7EFqFHDwdlSsAYx08crFQ= X-Google-Smtp-Source: AGHT+IEmM8ihBdqHX6ND8A+MLVS7WIflD1IiyM9lBAE8pT58k/I+FuwVCfGG3vtZ4H3SEjIg2+Y8LrGvYI++V0asczo= X-Received: by 2002:a25:90c:0:b0:d85:df88:a7c4 with SMTP id 12-20020a25090c000000b00d85df88a7c4mr8502706ybj.18.1701022797973; Sun, 26 Nov 2023 10:19:57 -0800 (PST) MIME-Version: 1.0 References: <20230811155526.ed7v77u7bzkmtfju@erthalion.local> In-Reply-To: From: Pavel Stehule Date: Sun, 26 Nov 2023 19:19:19 +0100 Message-ID: Subject: Re: Schema variables - new implementation for Postgres 15 To: Julien Rouhaud Cc: Dmitry Dolgov <9erthalion6@gmail.com>, Peter Eisentraut , Sergey Shinderuk , Tomas Vondra , dean.a.rasheed@gmail.com, er@xs4all.nl, joel@compiler.org, pgsql-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000a0ccda060b123b33" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000a0ccda060b123b33 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi st 22. 11. 2023 v 7:20 odes=C3=ADlatel Julien Rouhaud napsal: > Hi, > > On Tue, Oct 17, 2023 at 08:52:13AM +0200, Pavel Stehule wrote: > > > > When I thought about global temporary tables, I got one maybe interesti= ng > > idea. The one significant problem of global temporary tables is place f= or > > storing info about size or column statistics. > > > > I think so these data can be stored simply in session variables. Any > global > > temporary table can get assigned one session variable, that can hold > these > > data. > > I don't know how realistic this would be. For instance it will require t= o > properly link the global temporary table life cycle with the session > variable > and I'm afraid it would require to add some hacks to make it work as > needed. > > But this still raises the question of whether this feature could be used > internally for the need of another feature. If we think it's likely, > should we > try to act right now and reserve the "pg_" prefix for internal use rather > than > do that a few years down the line and probably break some user code as it > was > done recently for the role names? > I don't think it is necessary. Session variables (in this design) are joined with schemas. If we use some session variables for system purposes, we can use some dedicated schema. But when I think about it in detail, probably my own dedicated storage (hash table in session memory) can be much better than session variables. What can be shared (maybe) is probably sinval message processing. --000000000000a0ccda060b123b33 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

st 22. 11. 2023 v=C2=A07:20 odes=C3=ADlatel J= ulien Rouhaud <rjuju123@gmail.com<= /a>> napsal:
= Hi,

On Tue, Oct 17, 2023 at 08:52:13AM +0200, Pavel Stehule wrote:
>
> When I thought about global temporary tables, I got one maybe interest= ing
> idea. The one significant problem of global temporary tables is place = for
> storing info about size or column statistics.
>
> I think so these data can be stored simply in session variables. Any g= lobal
> temporary table can get assigned one session variable, that can hold t= hese
> data.

I don't know how realistic this would be.=C2=A0 For instance it will re= quire to
properly link the global temporary table life cycle with the session variab= le
and I'm afraid it would require to add some hacks to make it work as ne= eded.

But this still raises the question of whether this feature could be used internally for the need of another feature.=C2=A0 If we think it's like= ly, should we
try to act right now and reserve the "pg_" prefix for internal us= e rather than
do that a few years down the line and probably break some user code as it w= as
done recently for the role names?

--000000000000a0ccda060b123b33--