Re: Error with index on unlogged table

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Error with index on unlogged table
Дата
Msg-id CAB7nPqSTaCyhUcggg3_-GP_cTF4s2wceU=MPe-JQTepkY5=AWg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Error with index on unlogged table  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On Wed, Mar 25, 2015 at 10:53 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> Hi,
>
> On 2015-03-25 11:38:30 +0900, Michael Paquier wrote:
>> On Tue, Mar 24, 2015 at 8:46 PM, Thom Brown wrote:
>> > The index is unlogged until reindexing...
>> >
>> > [...]
>> > Which is think also raises the question, why are unlogged indexes made
>> > persistent by a reindex?
>>
>> That's a bug of HEAD, ~9.4 keeping the index as unlogged even after
>> REINDEX INDEX. What happens is that ReindexIndex relies on
>> relpersistence provided by makeRangeVar at parse time, which is just
>> incorrect as it uses RELPERSISTENCE_PERMANENT all the time. The patch
>> attached fixes that...
>
> What the hell? That's somewhat nasty. Nice that it got caught before 9.5
> was released.
>
> Did you check whether a similar bug was made in other places of
> 85b506bb?

Yeah I got a look at the other code paths, particularly cluster and
matviews, and the relpersistence used is taken directly from a
Relation.

> Could you additionally add a regression test to this end?
> Seems like something worth testing.

Definitely. And I guess that Fabrizio already did that...
-- 
Michael



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add macros wrapping all usage of gcc's __attribute__.
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [COMMITTERS] pgsql: btree_gin: properly call DirectFunctionCall1()