Torn page hazard in ginRedoUpdateMetapage()

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Torn page hazard in ginRedoUpdateMetapage()
Дата
Msg-id 20120430173424.GB14212@tornado.leadboat.com
обсуждение исходный текст
Ответы Re: Torn page hazard in ginRedoUpdateMetapage()  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Torn page hazard in ginRedoUpdateMetapage()  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
When GIN changes a metapage, we WAL-log its ex-header content and never use a
backup block.  This reduces WAL volume since the vast majority of the metapage
is unused.  However, ginRedoUpdateMetapage() only restores the WAL-logged
content if the metapage LSN predates the WAL record LSN.  If a metapage write
tore and updated the LSN but not the other content, we would fail to complete
the update.  Instead, unconditionally reinitialize the metapage similar to how
_bt_restore_meta() handles the situation.

I found this problem by code reading and did not attempt to build a test case
illustrating its practical consequences.  It's possible that there's no
problem in practice on account of some reason I haven't contemplated.

Thanks,
nm

Вложения

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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: Analyzing foreign tables & memory problems
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Future In-Core Replication