Re: Non-superuser subscription owners

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Non-superuser subscription owners
Дата
Msg-id CA+Tgmob7OUFa0-1NS3tDrbyR+VmvmcWWw8qd61=aDQ7nn6suyA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Non-superuser subscription owners  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Non-superuser subscription owners  (Mark Dilger <mark.dilger@enterprisedb.com>)
Список pgsql-hackers
On Tue, Nov 30, 2021 at 6:55 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
> > This patch does detect ownership changes more quickly (at the
> > transaction boundary) than the current code (only when it reloads for
> > some other reason). Transaction boundary seems like a reasonable time
> > to detect the change to me.
> >
> > Detecting faster might be nice, but I don't have a strong opinion about
> > it and I don't see why it necessarily needs to happen before this patch
> > goes in.
>
> I think it would be better to do it before we allow subscription
> owners to be non-superusers.

I think it would be better not to ever do it at any time.

It seems like a really bad idea to me to change the run-as user in the
middle of a transaction. That seems prone to producing all sorts of
confusing behavior that's hard to understand, and hard to test. So
what are we to do if a change occurs mid-transaction? I think we can
either finish replicating the current transaction and then switch to
the new owner for the next transaction, or we could abort the current
attempt to replicate the transaction and retry the whole transaction
with the new run-as user. My guess is that most users would prefer the
former behavior to the latter.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Dubious usage of TYPCATEGORY_STRING
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: should we document an example to set multiple libraries in shared_preload_libraries?