Re: Schema variables - new implementation for Postgres 15

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Schema variables - new implementation for Postgres 15
Дата
Msg-id CAFj8pRCPuEJ+vv793vbJ2ZjoXMiVw=G4WGNJCmktjGVpkj4Yrg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Schema variables - new implementation for Postgres 15  (Julien Rouhaud <rjuju123@gmail.com>)
Ответы Re: Schema variables - new implementation for Postgres 15  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
Hi

ne 23. 1. 2022 v 9:52 odesílatel Julien Rouhaud <rjuju123@gmail.com> napsal:
Hi,

On Sun, Jan 23, 2022 at 09:25:56AM +0100, Pavel Stehule wrote:
> ne 23. 1. 2022 v 9:10 odesílatel Julien Rouhaud <rjuju123@gmail.com> napsal:
>
> 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.

Yes, inside a single query it should probably be ok, but I'm talking about
multiple query execution in the same transaction.

I tested it now. a sinval message is waiting on the transaction end.  So when a variable is used, then it is working fine until the transaction ends.
But when the session makes some DDL, then send sinval to self, and at this moment, the variable can be dropped before the transaction ends.

So to be safe, the lock is required. I'll do it tomorrow.

Regards

Pavel





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Marcos Pegoraro
Дата:
Сообщение: current_schema will not use an text index ?
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: Schema variables - new implementation for Postgres 15