Re: How about a proper TEMPORARY TABLESPACE?
От | Fabrízio de Royes Mello |
---|---|
Тема | Re: How about a proper TEMPORARY TABLESPACE? |
Дата | |
Msg-id | CAFcNs+pLDwPnbYF+CwONd8CDdtAhwvsRJFfiThUbznOy0sC9BQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: How about a proper TEMPORARY TABLESPACE? (Stephen Frost <sfrost@snowman.net>) |
Ответы |
Re: How about a proper TEMPORARY TABLESPACE?
|
Список | pgsql-hackers |
<div dir="ltr"><div class="gmail_extra"><br />On Wed, Jun 18, 2014 at 9:00 AM, Stephen Frost <<a href="mailto:sfrost@snowman.net">sfrost@snowman.net</a>>wrote:<br />><br />> > I have took some small time tomake a PoC just to see if that is doable.<br /> > > And so I did a new syntax like:<br />> ><br />> > CREATE TABLESPACE spcname [TEMP | TEMPORARY] LOCATION ...<br />> ><br />> > So, if TEMP or TEMPORARYis present, I mark a new column at pg_tablespace<br /> > > as true. On every table creation or moving to anew tablespace, I just<br />> > check this, and fails if the tablespace is "temporary" but the<br />> > "relpersistence"says the table is not.<br /> ><br />> Not sure about that specific syntax (don't we have SET optionsnow?) but<br />> I do like the general idea.<br />><br /><br /></div><div class="gmail_extra">Maybe somethinglike that:<br /><br />CREATE TABLESPACE spcname LOCATION '/foo/bar' WITH (only_temp_relations = true);<br /></div><divclass="gmail_extra"><br /></div><div class="gmail_extra">Have in mind you must take care if you use ALTER TABLESPACEspcname SET (...) to guarantee that exists only temp objects stored in the target tablespace, and if exists a regularobject you must throw an exception.<br /><br /></div><div class="gmail_extra">Makes sense?<br /></div><div class="gmail_extra"><br/></div><div class="gmail_extra">Regards,<br /><br /></div><div class="gmail_extra">--<br />Fabríziode Royes Mello<br />Consultoria/Coaching PostgreSQL<br /> >> Timbira: <a href="http://www.timbira.com.br">http://www.timbira.com.br</a><br/>>> Blog sobre TI: <a href="http://fabriziomello.blogspot.com">http://fabriziomello.blogspot.com</a><br/>>> Perfil Linkedin: <a href="http://br.linkedin.com/in/fabriziomello">http://br.linkedin.com/in/fabriziomello</a><br/> >> Twitter: <a href="http://twitter.com/fabriziomello">http://twitter.com/fabriziomello</a></div></div>
В списке pgsql-hackers по дате отправления: