Re: New trigger option of pg_standby
От | Simon Riggs |
---|---|
Тема | Re: New trigger option of pg_standby |
Дата | |
Msg-id | 1239381103.16396.30.camel@ebony.2ndQuadrant обсуждение исходный текст |
Ответ на | Re: New trigger option of pg_standby (Fujii Masao <masao.fujii@gmail.com>) |
Ответы |
Re: New trigger option of pg_standby
|
Список | pgsql-hackers |
Fujii-san, I like the new patch using the content of the file to determine the mode. Much easier to use at failover time. On Fri, 2009-04-10 at 12:47 +0900, Fujii Masao wrote: > > One problem with this patch is that in smart mode, the trigger file is not > > deleted. That's different from current pg_standby behavior, and makes > > accidental failovers after one failover more likely. > > Yes, it's because pg_standby cannot be sure when the trigger file > can be removed in smart mode. If the trigger file is deleted as soon > as it's found, just like in fast mode, pg_standby may keep waiting > for WAL file again. My understanding of smart mode is fairly simple: if (triggered) {if (smartMode && nextWALfile+1 exists) exit(0);else{ delete trigger file exit(1);} } If you perform a file lookahead (the +1) as shown above then you avoid the problem Heikki observes. -- Simon Riggs www.2ndQuadrant.comPostgreSQL Training, Services and Support
В списке pgsql-hackers по дате отправления: