On Wed, Dec 14, 2022 at 4:44 PM Greg Stark <stark@mit.edu> wrote:
> > You do have to lock a table in order to update its pg_class row,
> > though, whether the table is temporary or not. Otherwise, another
> > session could drop it while you're doing something with it, after
> > which bad things would happen.
>
> I was responding to this from Andres:
>
> > Is that actually true? Don't we skip some locking operations for temporary
> > tables, which then also means catalog modifications cannot safely be done in
> > other sessions?
>
> I don't actually see this in the code ...
Yes, I think Andres may be wrong in this case.
(Dang, I don't get to say that very often.)
--
Robert Haas
EDB: http://www.enterprisedb.com