Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-09-02 Thread Kyotaro HORIGUCHI
Hi, I also tried this. This looks nice but seems a bit difficult to find a rasonable behavior. I have worked on that patch a little more. So now I have functional patch (although still WIP) attached. The feature works as following: - Added a boolean parameter only_temp_files to

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-08-15 Thread Fujii Masao
On Sun, Jun 29, 2014 at 3:19 AM, Matheus de Oliveira matioli.math...@gmail.com wrote: Hi Hackers, I have worked on that patch a little more. So now I have functional patch (although still WIP) attached. The feature works as following: - Added a boolean parameter only_temp_files to

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-30 Thread Craig Ringer
On 06/29/2014 02:19 AM, Matheus de Oliveira wrote: Hi Hackers, I have worked on that patch a little more. So now I have functional patch (although still WIP) attached. The feature works as following: - Added a boolean parameter only_temp_files to pg_tablespace.spcoptions; - This parameter

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-30 Thread Matheus de Oliveira
On Mon, Jun 30, 2014 at 5:14 AM, Craig Ringer cr...@2ndquadrant.com wrote: Right now PostgreSQL appears to rely on the absence of the tablespace directory as a flag to tell it don't start up, something's badly wrong here. Well, in fact the behavior is just to give a LOG message: LOG:

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-28 Thread Matheus de Oliveira
Hi Hackers, I have worked on that patch a little more. So now I have functional patch (although still WIP) attached. The feature works as following: - Added a boolean parameter only_temp_files to pg_tablespace.spcoptions; - This parameter can be set to true only during CREATE TABLESPACE, not on

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-24 Thread Matheus de Oliveira
On Sun, Jun 22, 2014 at 2:35 AM, Craig Ringer cr...@2ndquadrant.com wrote: A way to put UNLOGGED objects in such a space and have them recovered if they vanish would also be valuable, IMO. Not necessarily in the same patch, I'd just rather keep it in mind so any chosen design doesn't

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-23 Thread Robert Haas
On Wed, Jun 18, 2014 at 9:39 PM, Matheus de Oliveira matioli.math...@gmail.com wrote: Then, to summarize Matheus must do: * use an option instead of change the syntax and catalog to indicate that a tablespace is used to store temp objects Yes. I myself wasn't sure TEMPORARY syntax would be

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-23 Thread Fabrízio de Royes Mello
On Mon, Jun 23, 2014 at 1:17 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Jun 18, 2014 at 9:39 PM, Matheus de Oliveira matioli.math...@gmail.com wrote: Then, to summarize Matheus must do: * use an option instead of change the syntax and catalog to indicate that a tablespace is

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-22 Thread Stephen Frost
* Craig Ringer (cr...@2ndquadrant.com) wrote: On 06/18/2014 08:00 PM, Stephen Frost wrote: PG would need to enforce that it's only used for temporary objects as well, of course.. Or at least, that was my thinking on this. A way to put UNLOGGED objects in such a space and have them

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-21 Thread Craig Ringer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/18/2014 08:00 PM, Stephen Frost wrote: PG would need to enforce that it's only used for temporary objects as well, of course.. Or at least, that was my thinking on this. A way to put UNLOGGED objects in such a space and have them recovered

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-21 Thread Craig Ringer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/22/2014 01:35 PM, Craig Ringer wrote: A way to put UNLOGGED objects in such a space and have them recovered if they vanish would also be valuable, IMO. By which I mean re-created empty, as if after a crash. - -- Craig Ringer

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-19 Thread Fabrízio de Royes Mello
On Wed, Jun 18, 2014 at 10:39 PM, Matheus de Oliveira matioli.math...@gmail.com wrote: I was going to answer each message, but Fabrízio summarized everything so far really nicely. Thanks Fabrízio. You're welcome. :-) On Wed, Jun 18, 2014 at 5:25 PM, Fabrízio de Royes Mello

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-18 Thread Stephen Frost
* Matheus de Oliveira (matioli.math...@gmail.com) wrote: Hi Hackers, Having read only the subject- +1 from me on the idea. Maybe +1000. I was facing a situation were we wanted to set temp_tablespaces to a tablespace on a ephemeral disk (yes, it is AWS ephemeral disk), and I know many users

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-18 Thread Fabrízio de Royes Mello
On Wed, Jun 18, 2014 at 9:00 AM, Stephen Frost sfr...@snowman.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

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-18 Thread Stephen Frost
* Fabrízio de Royes Mello (fabriziome...@gmail.com) wrote: On Wed, Jun 18, 2014 at 9:00 AM, Stephen Frost sfr...@snowman.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

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-18 Thread Tom Lane
Stephen Frost sfr...@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

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-18 Thread Fabrízio de Royes Mello
On Wed, Jun 18, 2014 at 1:59 PM, Tom Lane t...@sss.pgh.pa.us wrote: Stephen Frost sfr...@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

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-18 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Stephen Frost sfr...@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

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-18 Thread Alvaro Herrera
Stephen Frost wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: Stephen Frost sfr...@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

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-18 Thread Fabrízio de Royes Mello
On Wed, Jun 18, 2014 at 4:53 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Stephen Frost wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: Stephen Frost sfr...@snowman.net writes: Yes. I'd definitely like to see an ALTER TABLESPACE option, with an ERROR that lists out all of the

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-18 Thread Matheus de Oliveira
I was going to answer each message, but Fabrízio summarized everything so far really nicely. Thanks Fabrízio. On Wed, Jun 18, 2014 at 5:25 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Then, to summarize Matheus must do: * use an option instead of change the syntax and catalog to

[HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-17 Thread Matheus de Oliveira
Hi Hackers, I was facing a situation were we wanted to set temp_tablespaces to a tablespace on a ephemeral disk (yes, it is AWS ephemeral disk), and I know many users have faced the same situation. Although it seems safe to create a tablespace on ephemeral disks if you use it to store only