Re: max_standby_delay considered harmful - Mailing list pgsql-hackers

From Tom Lane
Subject Re: max_standby_delay considered harmful
Date
Msg-id 2213.1273072239@sss.pgh.pa.us
Whole thread Raw
In response to Re: max_standby_delay considered harmful  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> To accomplish what you're trying to accomplish, you would need to label
> each received WAL record with the timestamp when it was received, and
> compare the reception timestamp of the record you're applying against
> current timestamp.

Yeah, this is why I thought that closed-loop lag control was a research
project.

In practice, we don't have to track it at the individual record level.
The real behavior of walsender is that we get a "gob" of WAL each
activity cycle, and so tracking the WAL start location and receipt time
for each gob ought to be sufficient.  (In fact trying to ascribe any
finer-grain receipt time than that to individual WAL records is probably
bogus anyway.)  It might be enough to remember the start location and
time for the latest gob, depending on exactly what control algorithm you
want to use.

But the whole thing requires significant thought and testing, which we
really haven't got time for now.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: max_standby_delay considered harmful
Next
From: Robert Haas
Date:
Subject: Re: max_standby_delay considered harmful