Re: max_standby_delay considered harmful - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: max_standby_delay considered harmful
Date
Msg-id 4BE176A7.20902@enterprisedb.com
Whole thread Raw
In response to Re: max_standby_delay considered harmful  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: max_standby_delay considered harmful
Re: max_standby_delay considered harmful
List pgsql-hackers
Simon Riggs wrote:
> The attached patch redefines "standby delay" to be the amount of time
> elapsed from point of receipt to point of application. The "point of
> receipt" is reset every chunk of data when streaming, or every file when
> reading file by file. In all cases this new time is later than the
> latest log time we would have used previously.

This seems completely wrong to me. If the WAL receiver keeps receiving
stuff, (last receive timestamp) - (current timestamp) would never be
more than a few seconds. Regardless of how much applying the WAL has
fallen behind.

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.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: buildfarm building all live branches from git
Next
From: Heikki Linnakangas
Date:
Subject: Re: max_standby_delay considered harmful