Re: How about a proper TEMPORARY TABLESPACE?

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
Cc: Matheus de Oliveira <matioli(dot)matheus(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How about a proper TEMPORARY TABLESPACE?
Date: 2014-06-18 16:28:29
Message-ID: 20140618162829.GD16098@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Fabrízio de Royes Mello (fabriziomello(at)gmail(dot)com) wrote:
> On Wed, Jun 18, 2014 at 9:00 AM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> > Not sure about that specific syntax (don't we have SET options now?) but
> > I do like the general idea.
>
> Maybe something like that:
>
> CREATE TABLESPACE spcname LOCATION '/foo/bar' WITH (only_temp_relations =
> true);

Yeah, that's more along the lines of what I was thinking.

> Have in mind you must take care if you use ALTER TABLESPACE spcname SET
> (...) to guarantee that exists only temp objects stored in the target
> tablespace, and if exists a regular object you must throw an exception.
>
> Makes sense?

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.

Thanks,

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-06-18 16:36:13 Re: Set new system identifier using pg_resetxlog
Previous Message Andres Freund 2014-06-18 16:13:00 Re: Atomics hardware support table & supported architectures