Re: [HACKERS] pg_standby: Question about truncation of trigger file in fast failover

2014-02-20 Thread Neil Thombre
On Wed, Feb 19, 2014 at 1:42 PM, Heikki Linnakangas wrote: > On 02/19/2014 11:15 PM, Neil Thombre wrote: > >> And that is where I have a question. I noticed that in pg_standby.c when >> we >> detect the word "fast" in the trigger file we truncate the file. >> >> https://github.com/postgres/postgr

Re: [HACKERS] pg_standby: Question about truncation of trigger file in fast failover

2014-02-19 Thread Heikki Linnakangas
On 02/19/2014 11:15 PM, Neil Thombre wrote: And that is where I have a question. I noticed that in pg_standby.c when we detect the word "fast" in the trigger file we truncate the file. https://github.com/postgres/postgres/blob/REL9_1_11/contrib/pg_standby/pg_standby.c#L456 There is also a comme

[HACKERS] pg_standby: Question about truncation of trigger file in fast failover

2014-02-19 Thread Neil Thombre
I was trying to understand (and then perhaps mimic) how pg_standby does a fast failover. My current understanding is that when a secondary db is in standby mode, it will exhaust all the archive log to be replayed from the primary and then start streaming. It is at this point that xlog.c checks fo