Re: Schema variables - new implementation for Postgres 15
Pavel Stehule <pavel.stehule@gmail.com>
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Dean Rasheed <dean.a.rasheed@gmail.com>,
Joel Jacobson <joel@compiler.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-01-23T08:25:56Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Allow underscores in integer and numeric constants.
- faff8f8e47f1 16.0 cited
-
Remove special outfuncs/readfuncs handling of RangeVar.catalogname.
- 3cece34be842 16.0 cited
-
Remove extra space from dumped ALTER DEFAULT PRIVILEGES.
- 2af33369e794 16.0 cited
-
Create FKs properly when attaching table as partition
- b0284bfb1db5 16.0 cited
-
psql: improve tab-complete's handling of variant SQL names.
- 02b8048ba5dc 15.0 cited
ne 23. 1. 2022 v 9:10 odesílatel Julien Rouhaud <rjuju123@gmail.com> napsal: > Hi, > > On Fri, Jan 21, 2022 at 09:23:34PM +0100, Pavel Stehule wrote: > > > > I am sending updated patches > > I've been looking a bit deeper at the feature and I noticed that there's no > locking involved around the session variable usage, and I don't think > that's > ok. AFAICS any variable used in a session will be cached in the local hash > table and will never try to access some catalog or cache, so I don't have > any > naive scenario that would immediately crash, but this has some other > implications that seems debatable. > > For instance, right now nothing prevents a variable from being dropped > while > another session is using it. > > Obviously we can't lock a session variable forever just because a session > assigned a value once ages ago, especially outside of the current > transaction. > But if a session set a variable in the local transaction, I don't think > that > it's ok to have a subsequent query failing because someone else > concurrently > dropped the variable. > > I only backlogged this current thread but I didn't see that being > discussed. > Isn't there enough stability of the system cache? sinval is sent at the moment when changes in the system catalog are visible. So inside query execution I don't see that the variable was dropped in another session.