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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to