Why xlog stuff is done after the filetruncate op in smgrtruncate?

Поиск
Список
Период
Сортировка
От Jacky Leng
Тема Why xlog stuff is done after the filetruncate op in smgrtruncate?
Дата
Msg-id evvf43$31ft$1@news.hub.org
обсуждение исходный текст
Ответы Re: Why xlog stuff is done after the filetruncate op in smgrtruncate?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Shouldn't we write xlog record before we do a physical operation?

An test case:
1. set full_page_writes off;
2. startup database; create a table; insert 100000 rows in it; shutdown
database;
3. startup database again; delete all rows from this table;
4. vacuum this table, and it will come into smgrtruncate; kill postmaster
before smgrtruncate do xlog stuff(set a breakpoint before xlog stuff);
5. startup database the 3rd time, during the recovery, the database will
crash with:   PANIC:  WAL contains references to invalid pages





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

Предыдущее
От: Zoltan Boszormenyi
Дата:
Сообщение: Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch
Следующее
От: Martin Langhoff
Дата:
Сообщение: Hacking on PostgreSQL via GIT