Re: New trigger option of pg_standby
От | Fujii Masao |
---|---|
Тема | Re: New trigger option of pg_standby |
Дата | |
Msg-id | 3f0b79eb0904132241p18084914g792cb8e5ab3eebb3@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: New trigger option of pg_standby (Fujii Masao <masao.fujii@gmail.com>) |
Ответы |
Re: New trigger option of pg_standby
|
Список | pgsql-hackers |
Hi, On Mon, Apr 13, 2009 at 2:52 PM, Fujii Masao <masao.fujii@gmail.com> wrote: > But, a lookahead nextWALfile seems to work fine. > > if (triggered) > { > if (smartMode && nextWALfile exists) > exit(0) > else > { > delete trigger file > exit(1) > } > } Umm... in this algorithm, the trigger file remains after failover if the nextWALfile has the invalid record which means the end of WAL files. I'd like to propose another simple idea; pg_standby deletes the trigger file *whenever* the nextWALfile is a timeline history file. A timeline history file is restored at the end of recovery, so it's guaranteed that the trigger file is deleted whether nextWALfile exists or not. A timeline history file is restored also at the beginning of recovery, so the accidentally remaining trigger file is deleted in early warm-standby as a side-effect of this idea. How does that sound? Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
В списке pgsql-hackers по дате отправления: