On Wed, Jun 18, 2014 at 1:59 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Stephen Frost <sfrost@snowman.net> writes: > > Yes. I'd definitely like to see an ALTER TABLESPACE option, with an > > ERROR that lists out all of the non-temporary objects which are found > > (and lists any other databases which have objects in those > > tablespaces..). That would allow administrators who have existing > > notionally temporary-only tablespaces to go clean things up to make them > > actually temporary-only. > > That seems just about impossible from a concurrency standpoint > (ie, what if someone is creating a new table in the tablespace > concurrently with your check? Possibly in a different database?) >
You are correct, I completely forgot that CREATE TABLESPACE is not transaction safe.
> I would certainly suggest that the first version of the patch not > undertake to allow this property to be ALTERed; the cost-benefit > ratio isn't there IMO. >