Re: New trigger option of pg_standby
От | Heikki Linnakangas |
---|---|
Тема | Re: New trigger option of pg_standby |
Дата | |
Msg-id | 49EC3B01.6050509@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: New trigger option of pg_standby (Fujii Masao <masao.fujii@gmail.com>) |
Ответы |
Re: New trigger option of pg_standby
|
Список | pgsql-hackers |
Fujii Masao wrote: > On Tue, Apr 14, 2009 at 2:41 PM, Fujii Masao <masao.fujii@gmail.com> wrote: >> 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. > > Here is the revised patch as above. I think we have gone off to an overly complicated solution. pg_standby shouldn't need to special-case history files, or know what order the server will ask for them. What's wrong with just this: (ignoring the missing fast option) --- a/contrib/pg_standby/pg_standby.c +++ b/contrib/pg_standby/pg_standby.c @@ -552,8 +552,6 @@ main(int argc, char **argv) break; case 't': /* Trigger file */ triggerPath = optarg; - if (CheckForExternalTrigger()) - exit(1); /* Normal exit, with non-zero */ break; case 'w': /*Max wait time */ maxwaittime = atoi(optarg); ie. only check and delete the trigger file once the server requests a file that doesn't exist. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: