Re: Temporary tables versus wraparound... again - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Temporary tables versus wraparound... again
Date
Msg-id CAM-w4HPvg7C0J9GRs90697f78+Xw6dDkDin47tu+4y+qMz1dyA@mail.gmail.com
Whole thread Raw
In response to Re: Temporary tables versus wraparound... again  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Temporary tables versus wraparound... again  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
> 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 but in any case we're not doing
any catalog modifications here. We're just inspecting values of
relfrozenxid and relminmxid in the struct returned from
SearchSysCache. Which I think is no different for temp tables than any
other table.



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Temporary tables versus wraparound... again
Next
From: Andrew Dunstan
Date:
Subject: Re: Error-safe user functions