pg_standby -l might destory the archived file

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема pg_standby -l might destory the archived file
Дата
Msg-id 3f0b79eb0905312247u3cc3db16hdd20e6b36b86ac71@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_standby -l might destory the archived file  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: pg_standby -l might destory the archived file  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Hi,

pg_standby can use ln command to restore an archived file,
which might destroy the archived file as follows.

1) pg_standby creates the symlink to the archived file '102'
2) '102' is applied
3) the next file '103' doesn't exist and the trigger file is created
4) '102' is re-fetched
5) at the end of recovery, the symlink to '102' is rename to '202',   but it still points '102'
6) after recovery, '202' is recycled (rename to '208', which still   points '102')
7) '208' is written new xlog records over   --> the archived file '102' comes down!

One simple solution to fix this problem is copying the content
of the symlink (ie. the archived file itself) and deleting it instead
of renaming it at the end of recovery.

Thought?

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Win32 link() function
Следующее
От: Sam Mason
Дата:
Сообщение: Re: Patch: AdjustIntervalForTypmod shouldn't discard high-order data