From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
Cc: | Erik Rijkers <er(at)xs4all(dot)nl>, Michael Paquier <michael(at)paquier(dot)xyz>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, DUVAL REMI <REMI(dot)DUVAL(at)cheops(dot)fr>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: proposal: schema variables |
Date: | 2024-09-03 11:41:31 |
Message-ID: | CAFj8pRBvUwfs96MX2_=unHQ107diUOK4S_WD=E4XBXkpXG3VjA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
Hi
po 2. 9. 2024 v 16:00 odesílatel Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
napsal:
> On Thu, 2024-08-29 at 19:33 +0200, Pavel Stehule wrote:
> > > > > > > + /*
> > > > > > > + * Although svar is freshly validated in this point, the
> svar->is_valid can
> > > > > > > + * be false, due possible accepting invalidation message
> inside domain
> > > > > > > + * check. Now, the validation is done after lock, that
> can also accept
> > > > > > > + * invalidation message, so validation should be
> trustful.
> > > > > > > + *
> > > > > > > + * For now, we don't need to repeat validation. Only
> svar should be valid
> > > > > > > + * pointer.
> > > > > > > + */
> > > > >
> > > > > This comment is related to assertions. Before I had there
> `Assert(svar->is_valid)`,
> > > > > because I expected it. But it was not always true. And although it
> is true,
> > > > > we don't need to validate a variable, because at this moment, the
> variable
> > > > > should be locked, and then we can return content safely.
> > > >
> > > > I guess my main problem is the word "trustful". I don't recognize
> that word.
> > > > Perhaps you can reword the comment along the lines of your above
> explanation.
> > >
> > >
> > > I'll try to change it
> >
> > is this better
> >
> > <-->/*
> > <--> * Although svar is freshly validated in this point, the
> svar->is_valid can
> > <--> * be false, due possible accepting invalidation message inside
> domain
> > <--> * check. But now, the variable, and all dependencies are locked, so
> we
> > <--> * don't need to repeat validation.
> > <--> */
>
> Much better.
>
> Here is an improved version:
>
> Although "svar" is freshly validated in this point, svar->is_valid can
> be false, if an invalidation message ws processed during the domain
> check.
> But the variable and all its dependencies are locked now, so we don't
> need
> to repeat the validation.
>
>
merged
thank you
Regards
Pavel
> Yours,
> Laurenz Albe
>
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Karlsson | 2024-09-03 12:09:04 | Re: JIT: The nullness of casetest.value can be determined at the JIT compile time. |
Previous Message | Zhijie Hou (Fujitsu) | 2024-09-03 11:28:59 | RE: Collect statistics about conflicts in logical replication |
From | Date | Subject | |
---|---|---|---|
Next Message | 陈雁飞 | 2024-09-08 08:21:12 | Estimate of the inner_rows |
Previous Message | Laurenz Albe | 2024-09-02 14:00:51 | Re: proposal: schema variables |