[HACKERS] Should buffer of initialization fork have a BM_PERMANENT flag

Поиск
Список
Период
Сортировка
От Wang Hao
Тема [HACKERS] Should buffer of initialization fork have a BM_PERMANENT flag
Дата
Msg-id CACYUyc8yccE4xfxhqxfh_Mh38j7dRFuxfaK1p6dSNAEUakxUyQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] Should buffer of initialization fork have aBM_PERMANENT flag  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
An unlogged table has an initialization fork. The initialization fork does not have an BM_PERMANENT flag when get a buffer.
In checkpoint (not shutdown or end of recovery), it will not write to disk. 
after a crash recovery, the page of initialization fork will not correctly, then make the main fork not correctly too.

Here is an example for GIN index.

create unlogged table gin_test_tbl(i int4[]);
create index gin_test_idx on gin_test_tbl using gin (i);
checkpoint;

kill all the postgres process, and restart again.

vacuum gin_test_tbl;  -- crash.

It seems have same problem in BRIN, GIN, GiST and HASH index which using buffer for meta page initialize in ambuildempty function.

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: [HACKERS] Checksums by default?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Checksums by default?