Re: time-delayed standbys - Mailing list pgsql-hackers

From Greg Stark
Subject Re: time-delayed standbys
Date
Msg-id BANLkTikPdjn98yjSR-VYywyjMe64wdrdDQ@mail.gmail.com
Whole thread Raw
In response to Re: time-delayed standbys  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: time-delayed standbys  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Apr 20, 2011 at 2:19 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> How would we keep track of the most recent timestamp received from the
> master without replaying the WAL records?

Well as we receive them we would have to peek at them to see the time.
Or we could have the master send its time to the slave as I believe
Tom has already proposed in the past but I believe didn't choose to
do? I haven't really been following all the twists and turns of
streaming replication and sync replication. I read the e-mails but
fell behind a few times so I'm not sure what the end result was
sometimes.

> What happens if the connection to the master is lost?

We're writing these records to disk no?  I don't understand the
problem. It doesn't even matter if the records get lost and have to be
retrieved again, as long as we gate the recovery of the records based
on a time we know the master has seen sometime.

Oh, I think I see what you're getting at. We would never replay the
last five minutes if there's no connection. We definitely want to make
sure the admin is aware of the lag and can disable this feature before
bringing up the slave.

-- 
greg


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: REINDEX vs broken HOT chains, redux
Next
From: Alvaro Herrera
Date:
Subject: Re: pgbench \for or similar loop