Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9gJ2-0002cL-8X for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Nov 2016 22:46:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c9gJ1-0002sL-Ee for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Nov 2016 22:46:19 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c9gJ0-0002rd-3I for pgsql-bugs@postgresql.org; Wed, 23 Nov 2016 22:46:18 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c9gIx-0001bT-DV for pgsql-bugs@postgresql.org; Wed, 23 Nov 2016 22:46:16 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uANMkBaR004724; Wed, 23 Nov 2016 17:46:11 -0500 From: Tom Lane To: Michael Paquier cc: Julien Rouhaud , sudalai , PostgreSQL mailing lists Subject: Re: Index file got removed In-reply-to: References: <1479294998857-5930602.post@n3.nabble.com> <23523.1479317197@sss.pgh.pa.us> <25687.1479927019@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Thu, 24 Nov 2016 07:05:58 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4722.1479941171.1@sss.pgh.pa.us> Date: Wed, 23 Nov 2016 17:46:11 -0500 Message-ID: <4723.1479941171@sss.pgh.pa.us> X-Pg-Spam-Score: -4.8 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Michael Paquier writes: > On Thu, Nov 24, 2016 at 3:50 AM, Tom Lane wrote: >> I think that this is the correct fix. There aren't any other callers >> in the core code, and even if some third party is calling it, it's >> fairly hard to see what usage would be okay with a TABLESPACE clause >> being appended some of the time but not all of the time. Also, both >> of the other proposed fixes seem like kluges to me. > This fix looked like a kludge to me, that's why I did not do it :) > Any code paths of ALTER TABLE calling DefineIndex won't take advantage > of is_alter_table to define the tablespace, so we may be bitten again > by the same kind of problems in the future. Well, the reason that way seemed like a kluge is that I don't see what connection is_alter_table has to overriding DefineIndex's normal idea of which tablespace to use. I think that's at least as likely to induce new bugs as fix them. For instance, wouldn't it change the behavior of ALTER TABLE ADD PRIMARY KEY? It seems to me that that command *should* honor default_tablespace, if there's no tablespace clause in it. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs