Re: time-delayed standbys
От | Greg Stark |
---|---|
Тема | Re: time-delayed standbys |
Дата | |
Msg-id | BANLkTimQG+58K2g04benfc4OLW=AhJo2cw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: time-delayed standbys (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Wed, Apr 20, 2011 at 3:41 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Greg Stark <gsstark@mit.edu> writes: >> Ah, so we did put the master's clock in every message? > > Yes, we did. And by "we" I mean "you".... I realize I'm tossing in comments from the peanut gallery to you and especially Robert who worked on this stuff a lot already. >> Then this >> should be simple, no? Just compare the master's timestamp from the >> record to the last master's clock seen in the messages. That sounds >> equivalent but a lot safer than trying to keep a conversion between >> them. > > Well, the question is what happens after you stop receiving master > messages. If you don't make use of the slave's clock somehow, > application of WAL will stop dead in the water, which seems unlikely > to be what's wanted. I'm not convinced that's so bad. But even so the logic could be: wait until (master.last_time_seen > this_record.master-timestamp+n minutes || gettimeofday() > this_record.local_time_when_received+nminutes) -- greg
В списке pgsql-hackers по дате отправления: