Re: SetQuerySnapshot() for utility statements

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SetQuerySnapshot() for utility statements
Дата
Msg-id 9108.971967894@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SetQuerySnapshot() for utility statements  ("Mikheev, Vadim" <vmikheev@SECTORBASE.COM>)
Список pgsql-hackers
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM> writes:
>> Seems to me this is very broken.  Isn't a query snapshot needed for
>> any utility command that might do database accesses?

> Not needed. We don't support multi-versioning for schema operations.

No?  Seems to me we're almost there.  Look for instance at that DROP
USER bug I just fixed: it was failing because it wasn't careful to make
sure that during "DROP USER foo,bar", the loop iteration to delete user
bar would see the changes the first loop iteration had made.  So even
though we use a lot of table-level locking rather than true MVCC
behavior for schema changes, ISTM that we still have to play by all the
rules when it comes to tuple visibility.  In particular I suspect we
ought to be using standard query snapshot behavior...

> More of that, sometimes it would be better to read *dirty* data from
> system tables - so, no snapshot required.

There may be a small number of places like that, but for generic utility
operations like CREATE/DROP USER, I don't see that this is a good idea.
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Solaris FAQ
Следующее
От: Vince Vielhaber
Дата:
Сообщение: Re: Re: pg_dump docs