Point in time recovery: recreating relation files

Поиск
Список
Период
Сортировка
От Marc Munro
Тема Point in time recovery: recreating relation files
Дата
Msg-id 1014856798.19487.0.camel@bloodnok.com
обсуждение исходный текст
Ответы Re: Point in time recovery: recreating relation files  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
The current WAL recovery implementation does not recover newly created
objects such as tables.  My suggested patch is:

When XLogOpenRelation fails to open the relation file, if errno is
ENOENT (no file or directory) we shuld attempt to recreate the file
using smgrcreate.

This seems to work fine for tables, indexes and sequences but can anyone
see any potential problems?  I have not tried this with Toast tables;
are these handled any differently?

Is it reasonable to assume that recreating the file in this way is
safe?  It seems OK to me as we only recreate the file if it does not
already exist, so we are not in danger of making a bad situation worse.

If no-one tells me this is a bad idea, I will submit a patch.

-- 
Marc        marc@bloodnok.com


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

Предыдущее
От: Hiroshi Inoue
Дата:
Сообщение: Re: eWeek Poll: Which database is most critical to your
Следующее
От: Marc Munro
Дата:
Сообщение: Point in time recovery: archiving WAL files