Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-08-12 Thread Simon Riggs
On 3 August 2015 at 01:35, Andreas Karlsson wrote: > On 07/15/2015 09:30 PM, Robert Haas wrote: > >> On Tue, Jul 14, 2015 at 5:57 PM, Jim Nasby >> wrote: >> >>> On 7/7/15 7:07 AM, Andres Freund wrote: >>> On 2015-07-03 18:03:58 -0400, Tom Lane wrote: > I have just looked through th

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-08-02 Thread Andreas Karlsson
On 07/15/2015 09:30 PM, Robert Haas wrote: On Tue, Jul 14, 2015 at 5:57 PM, Jim Nasby wrote: On 7/7/15 7:07 AM, Andres Freund wrote: On 2015-07-03 18:03:58 -0400, Tom Lane wrote: I have just looked through this thread, and TBH I think we should reject this patch altogether --- not RWF, but "n

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-07-15 Thread Robert Haas
On Tue, Jul 14, 2015 at 5:57 PM, Jim Nasby wrote: > On 7/7/15 7:07 AM, Andres Freund wrote: >> On 2015-07-03 18:03:58 -0400, Tom Lane wrote: >>> I have just looked through this thread, and TBH I think we should reject >>> this patch altogether --- not RWF, but "no we don't want this". The >>> use

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-07-14 Thread Jim Nasby
On 7/7/15 7:07 AM, Andres Freund wrote: On 2015-07-03 18:03:58 -0400, Tom Lane wrote: I have just looked through this thread, and TBH I think we should reject this patch altogether --- not RWF, but "no we don't want this". The use-case remains hypothetical: no performance numbers showing a real

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-07-07 Thread Andres Freund
On 2015-07-03 18:03:58 -0400, Tom Lane wrote: > I have just looked through this thread, and TBH I think we should reject > this patch altogether --- not RWF, but "no we don't want this". The > use-case remains hypothetical: no performance numbers showing a real-world > benefit have been exhibited

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-07-03 Thread Tom Lane
Andreas Karlsson writes: > On 03/21/2015 01:19 PM, Julien Tachoires wrote: >>> I am confused by your fix. Wouldn't cleaner fix be to use >>> tbinfo->reltablespace rather than tbinfo->reltoasttablespace when >>> calling ArchiveEntry()? >> Yes, doing this that way is cleaner. Here is a new version

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-21 Thread Andreas Karlsson
On 03/21/2015 01:19 PM, Julien Tachoires wrote: I am confused by your fix. Wouldn't cleaner fix be to use tbinfo->reltablespace rather than tbinfo->reltoasttablespace when calling ArchiveEntry()? Yes, doing this that way is cleaner. Here is a new version including your fix. Thanks. I am now s

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-21 Thread Julien Tachoires
On 20/03/2015 00:33, Andreas Karlsson wrote: > On 03/19/2015 04:55 PM, Julien Tachoires wrote: >> On 18/03/2015 19:54, Andreas Karlsson wrote: >>> Looks good but I think one minor improvement could be to set the table >>> space of the toast entires to the same as the tablespace of the table to >>>

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-19 Thread Andreas Karlsson
On 03/19/2015 04:55 PM, Julien Tachoires wrote: On 18/03/2015 19:54, Andreas Karlsson wrote: Looks good but I think one minor improvement could be to set the table space of the toast entires to the same as the tablespace of the table to reduce the amount of "SET default_tablespace". What do you

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-19 Thread Julien Tachoires
On 18/03/2015 19:54, Andreas Karlsson wrote: > On 03/17/2015 09:00 AM, Julien Tachoires wrote: >> Here is a new version fixing this issue. I've added a new kind of TOC >> entry for being able to handle pg_restore --no-tablespace case. > > Looks good but I think one minor improvement could be to se

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-18 Thread Andreas Karlsson
On 03/17/2015 09:00 AM, Julien Tachoires wrote: Here is a new version fixing this issue. I've added a new kind of TOC entry for being able to handle pg_restore --no-tablespace case. Looks good but I think one minor improvement could be to set the table space of the toast entires to the same as

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-17 Thread Julien Tachoires
On 15/03/2015 20:27, Julien Tachoires wrote: > On 15/03/2015 04:34, Andreas Karlsson wrote: >> On 03/15/2015 04:25 AM, Andreas Karlsson wrote: >>> Nice. You will also want to apply the attached patch which fixes support >>> for the --no-tablespaces flag. >> >> Just realized that --no-tablespaces ne

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-15 Thread Julien Tachoires
On 15/03/2015 04:34, Andreas Karlsson wrote: > On 03/15/2015 04:25 AM, Andreas Karlsson wrote: >> Nice. You will also want to apply the attached patch which fixes support >> for the --no-tablespaces flag. > > Just realized that --no-tablespaces need to be fixed for pg_restore too. Indeed, after t

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-14 Thread Andreas Karlsson
On 03/15/2015 04:25 AM, Andreas Karlsson wrote: Nice. You will also want to apply the attached patch which fixes support for the --no-tablespaces flag. Just realized that --no-tablespaces need to be fixed for pg_restore too. -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-h

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-14 Thread Andreas Karlsson
On 03/14/2015 05:59 PM, Julien Tachoires wrote: On 14/03/2015 16:10, Andreas Karlsson wrote: Noticed a bug when playing round some more with pg_dump. It does not seem to dump custom table space for the table and default table space for the toast correctly. It forgets about the toast table being

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-14 Thread Julien Tachoires
On 14/03/2015 16:10, Andreas Karlsson wrote: > Noticed a bug when playing round some more with pg_dump. It does not > seem to dump custom table space for the table and default table space > for the toast correctly. It forgets about the toast table being in > pg_default. Good catch. This is now

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-14 Thread Andreas Karlsson
Noticed a bug when playing round some more with pg_dump. It does not seem to dump custom table space for the table and default table space for the toast correctly. It forgets about the toast table being in pg_default. -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-14 Thread Andreas Karlsson
On 03/13/2015 11:48 AM, Julien Tachoires wrote: Here is a new version rebased against head and considering Andreas' last comments: - New regression tests about the fact that a notice is raised when ALTER TABLE SET TOAST TABLESPACE is done for a non-TOASTed table. - New regression tests to

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-13 Thread Julien Tachoires
Hi, On 10/03/2015 00:31, Andreas Karlsson wrote: > On 03/03/2015 04:14 PM, Julien Tachoires wrote: >> Sorry for the delay, I missed this thread. >> Here is a new version of this patch considering Andreas' comments. > > Please also add it to the next open commitfest so we do not lose the patch. H

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-12 Thread Julien Tachoires
On 10/03/2015 13:27, Alvaro Herrera wrote: > Robert Haas wrote: >> On Mon, Mar 9, 2015 at 7:26 PM, Andreas Karlsson wrote: > >>> I think we should allow moving the indexes for consistency. With this patch >>> we can move everything except for TOAST indexes. >> >> It might make sense to always put

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-11 Thread Andreas Karlsson
On 03/10/2015 01:23 PM, Robert Haas wrote: On Mon, Mar 9, 2015 at 7:26 PM, Andreas Karlsson wrote: - I do not like how \d handles the toast tablespace. Having TOAST in pg_default and the table in another space looks the same as if there was no TOAST table at all. I think we should always print

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-10 Thread Alvaro Herrera
Robert Haas wrote: > On Mon, Mar 9, 2015 at 7:26 PM, Andreas Karlsson wrote: > > I think we should allow moving the indexes for consistency. With this patch > > we can move everything except for TOAST indexes. > > It might make sense to always put the TOAST index with the TOAST > table, but it s

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-10 Thread Robert Haas
On Mon, Mar 9, 2015 at 7:26 PM, Andreas Karlsson wrote: >>> - I do not like how \d handles the toast tablespace. Having TOAST in >>> pg_default and the table in another space looks the same as if there was >>> no TOAST table at all. I think we should always print both tablespaces >>> if either of

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-09 Thread Andreas Karlsson
On 03/03/2015 04:14 PM, Julien Tachoires wrote: Sorry for the delay, I missed this thread. Here is a new version of this patch considering Andreas' comments. Please also add it to the next open commitfest so we do not lose the patch. -- Andreas Karlsson -- Sent via pgsql-hackers mailing list

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-09 Thread Andreas Karlsson
On 03/03/2015 04:14 PM, Julien Tachoires wrote: On 30/12/2014 03:48, Andreas Karlsson wrote: - A test fails in create_view.out. I looked some into it and did not see how this could happen. [...] I can't reproduce this issue. Neither can I anymore. - pg_dump is broken pg_dump: [arch

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-03 Thread Julien Tachoires
Hi, Sorry for the delay, I missed this thread. Here is a new version of this patch considering Andreas' comments. On 30/12/2014 03:48, Andreas Karlsson wrote: > - A test fails in create_view.out. I looked some into it and did not see > how this could happen. > > *** > /home/andreas/dev/po

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-01-14 Thread Michael Paquier
On Tue, Dec 30, 2014 at 11:48 AM, Andreas Karlsson wrote: > Here is my review of the feature. Marked as returned with feedback. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hacker

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2014-12-29 Thread Andreas Karlsson
Hi, Here is my review of the feature. - I have not worked enough with tablespaces to see if this patch would be useful. There was some uncertainty about this upstream. - Would it not be enough to simply allow running ALTER TABLE SET TABLESPACE on the TOAST tables? Or is manually modifying th

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2014-12-02 Thread Robert Haas
On Fri, Nov 28, 2014 at 11:38 AM, Alex Shulgin wrote: > Should I add this patch to the next CommitFest? If you don't want it to get forgotten about, yes. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-h

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2014-11-28 Thread Alex Shulgin
Julien Tachoires writes: > > 2011/12/15 Alvaro Herrera : >> >> Uhm, surely you could compare the original toast tablespace to the heap >> tablespace, and if they differ, handle appropriately when creating the >> new toast table? =A0Just pass down the toast tablespace into >> AlterTableCreateToastT

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2012-02-10 Thread Robert Haas
On Fri, Feb 10, 2012 at 2:23 PM, Jim Nasby wrote: > On 2/8/12 6:17 AM, Christian Nicolaisen wrote: >> We have some tables with documents and their metadata (filename, filetype, >> etc). >> Most of the time we just want to get the metadata (filename, filetype, >> etc) and not the document itself. >

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2012-02-10 Thread Jim Nasby
On 2/8/12 6:17 AM, Christian Nicolaisen wrote: Hi We have some tables with documents and their metadata (filename, filetype, etc). Most of the time we just want to get the metadata (filename, filetype, etc) and not the document itself. In this case it would be nice to have the metadata (which w

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2012-02-08 Thread Christian Nicolaisen
Hi We have some tables with documents and their metadata (filename, filetype, etc). Most of the time we just want to get the metadata (filename, filetype, etc) and not the document itself. In this case it would be nice to have the metadata (which wouldn't end up on the TOAST) on a fast array (

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2012-01-25 Thread Robert Haas
On Wed, Jan 25, 2012 at 7:13 AM, Julien Tachoires wrote: > 2012/1/24 Robert Haas : >> On Sun, Jan 22, 2012 at 11:04 AM, Julien Tachoires wrote: >>> 2011/12/15 Alvaro Herrera : Uhm, surely you could compare the original toast tablespace to the heap tablespace, and if they differ, ha

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2012-01-25 Thread Julien Tachoires
2012/1/24 Robert Haas : > On Sun, Jan 22, 2012 at 11:04 AM, Julien Tachoires wrote: >> 2011/12/15 Alvaro Herrera : >>> >>> Uhm, surely you could compare the original toast tablespace to the heap >>> tablespace, and if they differ, handle appropriately when creating the >>> new toast table?  Just p

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2012-01-24 Thread Robert Haas
On Sun, Jan 22, 2012 at 11:04 AM, Julien Tachoires wrote: > 2011/12/15 Alvaro Herrera : >> >> Uhm, surely you could compare the original toast tablespace to the heap >> tablespace, and if they differ, handle appropriately when creating the >> new toast table?  Just pass down the toast tablespace i

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2012-01-16 Thread Julien Tachoires
Hi, 2012/1/16 Alvaro Herrera : > > Excerpts from Jaime Casanova's message of lun ene 16 03:23:30 -0300 2012: >> On Tue, Dec 13, 2011 at 12:29 PM, Julien Tachoires wrote: >> > >> > OK, considering that, I don't see any way to handle the case raised by >> > Jaime :( >> >> Did you consider what Álv

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2012-01-16 Thread Alvaro Herrera
Excerpts from Jaime Casanova's message of lun ene 16 03:23:30 -0300 2012: > On Tue, Dec 13, 2011 at 12:29 PM, Julien Tachoires wrote: > > > > OK, considering that, I don't see any way to handle the case raised by > > Jaime :( > > Did you consider what Álvaro suggested? anyway, seems is too late

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2012-01-15 Thread Jaime Casanova
On Tue, Dec 13, 2011 at 12:29 PM, Julien Tachoires wrote: > > OK, considering that, I don't see any way to handle the case raised by Jaime > :( Did you consider what Álvaro suggested? anyway, seems is too late for this commitfest. are you intending to resume work on this for the next cycle? do w

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-12-15 Thread Alvaro Herrera
Excerpts from Julien Tachoires's message of mar dic 13 14:29:56 -0300 2011: > 2011/12/13 Robert Haas : > > On Tue, Dec 13, 2011 at 12:02 PM, Julien Tachoires wrote: > >> Right, it seems to happen when the destination tablespace is the same > >> as the database's tbs, because, in this case, relati

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-12-15 Thread Greg Smith
On 12/13/2011 12:29 PM, Julien Tachoires wrote: 2011/12/13 Robert Haas: On Tue, Dec 13, 2011 at 12:02 PM, Julien Tachoires wrote: Right, it seems to happen when the destination tablespace is the same as the database's tbs, because, in this case, relation's tbs is set to InvalidOid :

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-12-13 Thread Julien Tachoires
2011/12/13 Robert Haas : > On Tue, Dec 13, 2011 at 12:02 PM, Julien Tachoires wrote: >> Right, it seems to happen when the destination tablespace is the same >> as the database's tbs, because, in this case, relation's tbs is set to >> InvalidOid : >> src/backend/commands/tablecmds.c line 8342 >> >

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-12-13 Thread Robert Haas
On Tue, Dec 13, 2011 at 12:02 PM, Julien Tachoires wrote: > Right, it seems to happen when the destination tablespace is the same > as the database's tbs, because, in this case, relation's tbs is set to > InvalidOid : > src/backend/commands/tablecmds.c line 8342 > > +       rd_rel->reltablespace =

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-12-13 Thread Julien Tachoires
2011/12/13 Jaime Casanova : > On Mon, Dec 12, 2011 at 10:54 AM, Julien Tachoires wrote: >> 2011/12/10 Jaime Casanova : >>> On Mon, Nov 28, 2011 at 1:32 PM, Julien Tachoires wrote: >>> > 2) after CLUSTER the index of the toast table gets moved to the same > tablespace as the main table >>>

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-12-12 Thread Jaime Casanova
On Mon, Dec 12, 2011 at 10:54 AM, Julien Tachoires wrote: > Hi, > > 2011/12/10 Jaime Casanova : >> On Mon, Nov 28, 2011 at 1:32 PM, Julien Tachoires wrote: >> 2) after CLUSTER the index of the toast table gets moved to the same tablespace as the main table >>> >> >> there is still a var

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-12-12 Thread Robert Haas
On Sat, Dec 10, 2011 at 4:16 PM, Jaime Casanova wrote: >>> now, if we are now supporting this variants >>> ALTER TABLE SET TABLE TABLESPACE >>> ALTER TABLE SET TOAST TABLESPACE >>> >>> why not also support ALTER TABLE SET INDEX TABLESPACE which should >>> have the same behaviour as ALTER INDEX SET

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-12-12 Thread Julien Tachoires
Hi, 2011/12/10 Jaime Casanova : > On Mon, Nov 28, 2011 at 1:32 PM, Julien Tachoires wrote: > >>> 2) after CLUSTER the index of the toast table gets moved to the same >>> tablespace as the main table >> > > there is still a variant of this one, i created 3 tablespaces (datos_tblspc): > > """ > cre

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-12-10 Thread Jaime Casanova
On Mon, Nov 28, 2011 at 1:32 PM, Julien Tachoires wrote: > Hi Jaime, > > Please find a new version. > cool >> 2) after CLUSTER the index of the toast table gets moved to the same >> tablespace as the main table > there is still a variant of this one, i created 3 tablespaces (datos_tblspc): """

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-11-15 Thread Jaime Casanova
On Tue, Nov 15, 2011 at 11:08 AM, Julien Tachoires wrote: > > Maybe I'd missed something, but the normal case is : > ALTER TABLE ... SET TABLESPACE => moves Table + moves associated TOAST Table > ALTER TABLE ... SET TABLE TABLESPACE => moves Table & keeps associated > TOAST Table at its place > AL

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-11-15 Thread Jaime Casanova
On Tue, Nov 15, 2011 at 11:08 AM, Julien Tachoires wrote: > > Maybe I'd missed something, but the normal case is : > ALTER TABLE ... SET TABLESPACE => moves Table + moves associated TOAST Table > ALTER TABLE ... SET TABLE TABLESPACE => moves Table & keeps associated > TOAST Table at its place > AL

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-11-14 Thread Jaime Casanova
On Fri, Oct 7, 2011 at 10:10 AM, Julien Tachoires wrote: > Hi, > > Here's a patch to allow TOAST tables to be moved to a different tablespace. > This item has been picked up from the TODO list. > Main idea is to consider that a TOAST table can have its own tablespace. > Hi, This patch doesn't ap

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-10-08 Thread Kevin Grittner
Julien Tachoires 10/07/11 10:17 AM >>> > Here's a patch to allow TOAST tables to be moved to a different > tablespace. This item has been picked up from the TODO list. > Main idea is to consider that a TOAST table can have its own > tablespace. Thanks for the patch. Please add this to the ope