Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YVtCz-0004ix-Qu for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Mar 2015 02:50:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YVtCy-0003O7-O2 for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Mar 2015 02:50:48 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YVtCx-0003Ny-A2 for pgsql-hackers@postgresql.org; Thu, 12 Mar 2015 02:50:47 +0000 Received: from smtp2.scorpionshops.com ([82.118.24.225] helo=kilimanjaro.scorpionshops.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YVtCt-0006It-4P for pgsql-hackers@postgresql.org; Thu, 12 Mar 2015 02:50:45 +0000 Received: from [192.168.1.173] (92-32-205-89.tn.glocalnet.net [92.32.205.89]) by kilimanjaro.scorpionshops.com (Postfix) with ESMTPSA id 9302C7BC096; Thu, 12 Mar 2015 03:50:39 +0100 (CET) Message-ID: <5500FF01.3020308@proxel.se> Date: Thu, 12 Mar 2015 03:50:41 +0100 From: Andreas Karlsson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0 MIME-Version: 1.0 To: Robert Haas CC: Julien Tachoires , Alex Shulgin , Alvaro Herrera , Jaime Casanova , Pg Hackers Subject: Re: patch : Allow toast tables to be moved to a different tablespace References: <4E8F1666.2060409@gmail.com> <1323956011-sup-9589@alvh.no-ip.org> <87r3wn5lhq.fsf@commandprompt.com> <54A2127D.5020907@proxel.se> <54F5CFDE.20301@gmail.com> <54FE2C23.1080604@proxel.se> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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 both tablespaces >>>> if either of them are not pg_default. >>> >>> If we do it that way, we should always show the tablespace even if it's >>> pg_default in any case to be consistent. I'm pretty sure that we don't >>> want that. >> >> I think we will have to agree to disagree here. I think it should be obvious >> when the toast table is in the default tablespace for tables outside it. > > I'm not sure about the details here, but that seems like a pretty > sound principle. What I am talking about are the 6 cases below of \d with the current code. I think that case 4) and 5) look the same, which may confuse users skimming the \d into thinking that we have no TOAST table in the case where the TOAST table is in pg_default while the table tablespace is somewhere else. 1. Table in pg_default, no TOAST Column | Type | Modifiers --------+---------+----------- x | integer | 2. Table in pg_default, TOAST in pg_default Column | Type | Modifiers --------+------+----------- x | text | 3. Table in pg_default, TOAST in ts1 Column | Type | Modifiers --------+------+----------- x | text | TOAST Tablespace: "ts1" 4. Table in ts1, no TOAST Column | Type | Modifiers --------+---------+----------- x | integer | Tablespace: "ts1" 5. Table in ts1, TOAST in pg_default Column | Type | Modifiers --------+------+----------- x | text | Tablespace: "ts1" 6. Table in ts1, TOAST in ts1 Column | Type | Modifiers --------+------+----------- x | text | Tablespace: "ts1" TOAST Tablespace: "ts1" >> 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 seems strange to put the TOAST index with the heap and > the TOAST table someplace else. Or at least, that's how it seems to > me. Ok, my idea was that one might want to put all indexes in a third table space, including TOAST indexes. Not sure how realistic this use case is. -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers