From: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
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 13:54:10 |
Message-ID: | CAFcNs+pLDwPnbYF+CwONd8CDdtAhwvsRJFfiThUbznOy0sC9BQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 18, 2014 at 9:00 AM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
>
> > I have took some small time to make a PoC just to see if that is doable.
> > And so I did a new syntax like:
> >
> > CREATE TABLESPACE spcname [TEMP | TEMPORARY] LOCATION ...
> >
> > So, if TEMP or TEMPORARY is present, I mark a new column at
pg_tablespace
> > as true. On every table creation or moving to a new tablespace, I just
> > check this, and fails if the tablespace is "temporary" but the
> > "relpersistence" says the table is not.
>
> 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);
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?
Regards,
--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2014-06-18 13:55:30 | Re: comparison operators |
Previous Message | Bernd Helmle | 2014-06-18 13:52:23 | Re: Clarification of FDW API Documentation |