Re: Checking for stale reads on hot standby - Mailing list pgsql-general

From Fujii Masao
Subject Re: Checking for stale reads on hot standby
Date
Msg-id AANLkTi=jgnO5neqzcoJ3+zjuP0Z5BxMFv0+DcxG+SGCo@mail.gmail.com
Whole thread Raw
In response to Re: Checking for stale reads on hot standby  (Gurjeet Singh <singh.gurjeet@gmail.com>)
Responses Re: Checking for stale reads on hot standby  (Guillaume Lelarge <guillaume@lelarge.info>)
List pgsql-general
On Mon, Sep 27, 2010 at 9:09 AM, Gurjeet Singh <singh.gurjeet@gmail.com> wrote:
> See the nuggets hidden in section 25.2.5.2. "Monitoring" at
> http://www.postgresql.org/docs/9.0/static/warm-standby.html#STREAMING-REPLICATION
>
> After an UPDATE, your application can cache the info from
> 'pg_current_xlog_location()' result on the primary and then compare that
> with the result of  'pg_last_xlog_receive_location()' on the standby to see
> if it is seeing fresh enough data.

Yep, but since recovery might fall behind WAL receiving,
pg_last_xlog_replay_location should be called instead of
pg_last_xlog_receive_location.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

pgsql-general by date:

Previous
From: Gurjeet Singh
Date:
Subject: Re: Checking for stale reads on hot standby
Next
From: Yaroslav Tykhiy
Date:
Subject: Re: Restore/dump from "/usr/local/pgsql/data" directory