From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com> |
Cc: | Yang Zhang <yanghatespam(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Checking for stale reads on hot standby |
Date: | 2010-09-27 00:20:29 |
Message-ID: | AANLkTi=jgnO5neqzcoJ3+zjuP0Z5BxMFv0+DcxG+SGCo@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Sep 27, 2010 at 9:09 AM, Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Yaroslav Tykhiy | 2010-09-27 03:34:56 | Re: Restore/dump from "/usr/local/pgsql/data" directory |
Previous Message | Gurjeet Singh | 2010-09-27 00:09:31 | Re: Checking for stale reads on hot standby |