Re: Schema variables - new implementation for Postgres 15 (typo)

2023-02-03 Thread Pavel Stehule
Hi I read notes from the FOSDEM developer meeting, and I would like to repeat notice about motivation for introduction of session variables, and one reason why session_variables are not transactional, and why they should not be replaced by temp tables is performance. There are more use cases

Re: Schema variables - new implementation for Postgres 15 (typo)

2023-01-24 Thread Pavel Stehule
> > > I can be wrong, but from these numbers I don't think so these sync cycles > > should to contain CHECK_FOR_INTERRUPTS > > > > What do you think? > > Well, there is always possibility someone will create more variables > than any arbitrary limit we have tested for. But I see your point and >

Re: Schema variables - new implementation for Postgres 15 (typo)

2023-01-24 Thread Dmitry Dolgov
> On Mon, Jan 23, 2023 at 07:09:27PM +0100, Pavel Stehule wrote: > po 23. 1. 2023 v 15:25 odesílatel Dmitry Dolgov <9erthali...@gmail.com> > napsal: > > > > On Sun, Jan 22, 2023 at 07:47:07PM +0100, Pavel Stehule wrote: > > > pá 20. 1. 2023 v 21:35 odesílatel Dmitry Dolgov <9erthali...@gmail.com>

Re: Schema variables - new implementation for Postgres 15 (typo)

2023-01-23 Thread Pavel Stehule
po 23. 1. 2023 v 15:25 odesílatel Dmitry Dolgov <9erthali...@gmail.com> napsal: > > On Sun, Jan 22, 2023 at 07:47:07PM +0100, Pavel Stehule wrote: > > pá 20. 1. 2023 v 21:35 odesílatel Dmitry Dolgov <9erthali...@gmail.com> > > napsal: > > > > > * I think it was already mentioned in the thread,

Re: Schema variables - new implementation for Postgres 15 (typo)

2023-01-23 Thread Dmitry Dolgov
> On Sun, Jan 22, 2023 at 07:47:07PM +0100, Pavel Stehule wrote: > pá 20. 1. 2023 v 21:35 odesílatel Dmitry Dolgov <9erthali...@gmail.com> > napsal: > > > * I think it was already mentioned in the thread, there seems to be not a > > single usage of CHECK_FOR_INTERRUPTS in session_variable.c .

Re: Schema variables - new implementation for Postgres 15 (typo)

2023-01-20 Thread Dmitry Dolgov
I've accumulated another collection of various questions and comments. As a side note I'm getting a good feeling about this patch, those part I've read so far looks good to me. * I've suddenly realized one could use pseudo types for variables, and it not always works. E.g.: =# create

Re: Schema variables - new implementation for Postgres 15 (typo)

2023-01-11 Thread Julien Rouhaud
On Tue, Jan 10, 2023 at 08:35:16PM +0100, Pavel Stehule wrote: > út 10. 1. 2023 v 3:20 odesílatel Julien Rouhaud napsal: > > > > Another new behavior I see is the new rowtype_only parameter for > > LookupVariable. Has this been discussed? > > > > I think so it was discussed about table shadowing

Re: Schema variables - new implementation for Postgres 15 (typo)

2023-01-09 Thread Julien Rouhaud
Hi, On Sat, Jan 07, 2023 at 08:09:27AM +0100, Pavel Stehule wrote: > > > > Hmm, how safe is it for third-party code to access the stored data directly > > rather than a copy? If it makes extension fragile if they're not careful > > enough with cache invalidation, or even give them a way to mess

Re: Schema variables - new implementation for Postgres 15 (typo)

2023-01-06 Thread Julien Rouhaud
Hi, On Fri, Jan 06, 2023 at 08:02:41PM +0100, Pavel Stehule wrote: > pá 6. 1. 2023 v 5:11 odesílatel Julien Rouhaud napsal: > > > > > +Datum > > +GetSessionVariableWithTypeCheck(Oid varid, bool *isNull, Oid > > expected_typid) > > +{ > > + SVariable svar; > > + > > + svar =

Re: Schema variables - new implementation for Postgres 15 (typo)

2023-01-05 Thread Julien Rouhaud
Hi, On Fri, Dec 23, 2022 at 08:38:43AM +0100, Pavel Stehule wrote: > > I am sending an updated patch, fixing the mentioned issue. Big thanks for > testing, and checking. There were multiple reviews in the last weeks which reported some issues, but unless I'm missing something I don't see any

Re: Schema variables - new implementation for Postgres 15 (typo)

2022-12-22 Thread Dmitry Dolgov
> 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

Re: Schema variables - new implementation for Postgres 15 (typo)

2022-12-22 Thread Pavel Stehule
čt 22. 12. 2022 v 17:15 odesílatel Dmitry Dolgov <9erthali...@gmail.com> napsal: > Hi, > > I'm continuing review the patch slowly, and have one more issue plus one > philosophical question. > > The issue have something to do with variables invalidation. Enabling > debug_discard_caches = 1 (about

Re: Schema variables - new implementation for Postgres 15 (typo)

2022-12-22 Thread Dmitry Dolgov
Hi, I'm continuing review the patch slowly, and have one more issue plus one philosophical question. The issue have something to do with variables invalidation. Enabling debug_discard_caches = 1 (about which I've learned from this thread) and running this subset of the test suite:

Re: Schema variables - new implementation for Postgres 15 (typo)

2022-12-13 Thread Erik Rijkers
Op 14-12-2022 om 05:54 schreef Pavel Stehule: Hi fresh rebase typo alert: v20221214-0003-LET-command.patch contains errmsg("target session varible is of type %s" ('varible' should be 'variable') Erik