Is pg_control file crashsafe?

Поиск
Список
Период
Сортировка
От Alex Ignatov
Тема Is pg_control file crashsafe?
Дата
Msg-id 19518802B8BEC076.37020283-1F3D-49F4-9C55-2B7F3F8504E9@mail.outlook.com
обсуждение исходный текст
Ответы Re: Is pg_control file crashsafe?  (Bruce Momjian <bruce@momjian.us>)
Re: Is pg_control file crashsafe?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hello everyone!
We have some issue with truncated pg_control file on Windows after power failure.
My questions is : 
1) Is pg_control protected from say , power crash or partial write? 
2) How PG update pg_control? By writing in it or writing in some temp file and after that rename it to pg_control to be atomic?
3) Can PG have  multiple pg_control copy to be more fault tolerant?

PS During some experiments we found that at present time there is no any method to do crash recovery with "restored" version of pg_control (based on some manipulations with pg_resetxlog ).
 Only by using pg_resetxlog and setting it parameters to values taken from wal file (pg_xlogdump)we can at least start PG and saw that PG state is at the moment of last check point. But we have no real confidence that PG is in consistent state(also docs on pg_resetxlogs told us about it too)


Alex Ignatov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: 9.6 and fsync=off
Следующее
От: Sehrope Sarkuni
Дата:
Сообщение: Re: Add jsonb_compact(...) for whitespace-free jsonb to text