Re: Checking for stale reads on hot standby
| От | Guillaume Lelarge |
|---|---|
| Тема | Re: Checking for stale reads on hot standby |
| Дата | |
| Msg-id | 4CA02663.9010208@lelarge.info обсуждение исходный текст |
| Ответ на | Re: Checking for stale reads on hot standby (Fujii Masao <masao.fujii@gmail.com>) |
| Список | pgsql-general |
Le 27/09/2010 02:20, Fujii Masao a écrit : > 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. > pgPool-II can do that automatically for you in load balancing mode, and not use a standby node if it lags too much. -- Guillaume http://www.postgresql.fr http://dalibo.com
В списке pgsql-general по дате отправления: