Re: read only transaction, temporary tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: read only transaction, temporary tables
Дата
Msg-id 27778.1155395225@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: read only transaction, temporary tables  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> Temporary tables still get an entry in pg_class, so for truly readonly
> systems they wouldn't work.

The "READONLY" transaction status is a security mechanism, not a
performance-enhancing mechanism.  It makes no pretense of preventing
all disk writes.  I think a reasonable description of the feature
is that it's supposed to prevent you from making any database changes
that are visible to other transactions.

Having said that, though, the point about pg_class is a good one:
if you could create a temp table then you'd be making a catalog
change that would be visible to other transactions if they cared
to look.  So at some level or other I'd say it violates the concept
of READONLY.

(And having said *that*, I'd be all for avoiding making any permanent
catalog entries for temp tables, if I could think of a reasonably
noninvasive way to do it...)

            regards, tom lane

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

Предыдущее
От: RPK
Дата:
Сообщение: Migrating PostgreSQL database to MySQL/MS Access
Следующее
От: John Meyer
Дата:
Сообщение: Re: Automatic Backup Script