Re: Pg_stat_replication shows sync standby with flush location behind primary in 9.1.5

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Pg_stat_replication shows sync standby with flush location behind primary in 9.1.5
Date: 2012-10-04 06:06:52
Message-ID: CA+U5nMJ0sZmZrC8iKEaEZ38c_0CE3KxU74_grHjGmXDzoihHYQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 4 October 2012 05:32, Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz> wrote:
> I am seeing the situation where the reported flush location for the sync
> standby (standby1 below) is *behind* the reported current xlog location of
> the primary. This is Postgres 9.1.5 , and I was under the impression that
> transactions initiated on the master do not commit until the corresponding
> wal is flushed on the sync standby.
>
> Now the standby is definitely working in sync mode, because stopping it
> halts all write transactions on the primary (sync_standby_names contains
> only standby1). So is the reported lag in flush location merely an artifact
> of timing in the query, or is there something else going on? [1]

The writing of new WAL is independent of the wait that occurs on
commit, so it is entirely possible, even desirable, that the observed
effect occurs.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Mark Kirkwood 2012-10-04 07:56:45 Re: Pg_stat_replication shows sync standby with flush location behind primary in 9.1.5
Previous Message Mark Kirkwood 2012-10-04 04:32:13 Pg_stat_replication shows sync standby with flush location behind primary in 9.1.5