Re: Schema variables - new implementation for Postgres 15 (typo) - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Schema variables - new implementation for Postgres 15 (typo)
Date
Msg-id CAFj8pRAtghLtrOP1JLE+LnyJEnXdtmPL_oXGY_tuBqw7e2qXXg@mail.gmail.com
Whole thread Raw
In response to Re: Schema variables - new implementation for Postgres 15 (typo)  (Dmitry Dolgov <9erthalion6@gmail.com>)
Responses Re: Schema variables - new implementation for Postgres 15 (typo)  (Julien Rouhaud <rjuju123@gmail.com>)
List pgsql-hackers
Hi

čt 22. 12. 2022 v 22:23 odesílatel Dmitry Dolgov <9erthalion6@gmail.com> napsal:
> On Thu, Dec 22, 2022 at 08:45:57PM +0100, Pavel Stehule wrote:
> > From the first look it seems some major topics the discussion is evolving
> > are about:
> >
> > * Validity of the use case. Seems to be quite convincingly addressed in
> > [1] and
> > [2].
> >
> > * Complicated logic around invalidation, concurrent create/drop etc. (I
> > guess
> > the issue above is falling into the same category).
> >
> > * Concerns that session variables could repeat some problems of temporary
> > tables.
> >

I am sending an updated patch, fixing the mentioned issue. Big thanks for testing, and checking.
 
>
> Why do you think so? The variable has no mvcc support - it is just stored
> value with local visibility without mvcc support. There can be little bit
> similar issues like with global temporary tables.

Yeah, sorry for not being precise, I mean global temporary tables. This
is not my analysis, I've simply picked up it was mentioned a couple of
times here. The points above are not meant to serve as an objection
against the patch, but rather to figure out if there are any gaps left
to address and come up with some sort of plan with "committed" as a
final destination.

There are some similarities, but there are a lot of differences too. Handling of metadata is partially similar, but session variable is almost the value cached in session memory. It has no statistics, it is not stored in a file. Because there is different storage, I don't think there is some intersection on implementation level.

Regards

Pavel

Attachment

pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: Force streaming every change in logical decoding