Re: time-delayed standbys

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: time-delayed standbys
Date: 2011-04-20 14:07:38
Message-ID: BANLkTikPdjn98yjSR-VYywyjMe64wdrdDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 20, 2011 at 2:19 PM, Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2011-04-20 14:14:26 Re: pgbench \for or similar loop
Previous Message Tom Lane 2011-04-20 14:02:30 Re: REINDEX vs broken HOT chains, redux