Re: Index file got removed

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Index file got removed
Дата
Msg-id 25687.1479927019@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Index file got removed  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Index file got removed  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-bugs
Michael Paquier <michael.paquier@gmail.com> writes:
> So I have explored in the code what would be the best way to fix the pro=
blem:
> 1) Append the correct tablespace to the SQL string of CREATE INDEX.
> Those command strings are stored in changedIndexDefs in tablecmds.c,
> and those get generated by pg_get_indexdef_string(), which can append
> a tablespace if it is *not* a default. Appending *pg_default* to it
> would be dangerous and it would have user-visible changes. OK _string
> is not directly SQL callable but any caller of this function would be
> impacted.

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.

I pushed a patch that fixes it that way but incorporates your regression
test cases.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Backend receive buffer get corrupted with string: NOTICE: table "cleanup_keys" does not exist, skipping
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Index file got removed