Re: Index file got removed - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Index file got removed
Date
Msg-id 4723.1479941171@sss.pgh.pa.us
Whole thread Raw
In response to Re: Index file got removed  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Index file got removed
List pgsql-bugs
Michael Paquier <michael.paquier@gmail.com> writes:
> On Thu, Nov 24, 2016 at 3:50 AM, Tom Lane <tgl@sss.pgh.pa.us> 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

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Index file got removed
Next
From: Michael Paquier
Date:
Subject: Re: Index file got removed