Re: How about a proper TEMPORARY TABLESPACE? - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: How about a proper TEMPORARY TABLESPACE?
Date
Msg-id 20140618182001.GF16098@tamriel.snowman.net
Whole thread Raw
In response to Re: How about a proper TEMPORARY TABLESPACE?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: How about a proper TEMPORARY TABLESPACE?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
* 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?)

Yeah, that's definitely an annoying complexity.

> 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.

I suppose scheduling downtime to do the check manually across all
databases, then drop and recreate the tablespace, would work.  As
someone who's working with a couple of these cases, it'd be awful nice
if there was a way PG would handle it for me.
    Thanks,
        Stephen

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: API change advice: Passing plan invalidation info from the rewriter into the planner?
Next
From: Robert Haas
Date:
Subject: Re: pg_control is missing a field for LOBLKSIZE