Skip site navigation (1) Skip section navigation (2)

Re: replay_location indicates incorrect location

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: replay_location indicates incorrect location
Date: 2012-01-13 11:09:42
Message-ID: CA+U5nM+qJAT5o_=vGmX2VWHTvkVwVJPA8r1cgh-bk6nrzUMS1w@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Fri, Jan 13, 2012 at 10:04 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:

> When I looked at pg_stat_replication just after starting the standby before
> executing any write transactions on the master, I found that replay_location
> indicated incorrect location different from sent/write/flush_location. Then,
> if I ran write transaction on the master, replay_location indicated the same
> location as the others.
>
> The cause of this problem is that Xlogctl->recoveryLastRecPtr which points
> to replay_location is initialized with wrong variable ReadRecPtr. Instead, it
> should be initialized with EndRecPtr. Attached patch does that. This needs
> to be backported to 9.0.

Agreed. Will commit.

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

In response to

pgsql-hackers by date

Next:From: Fujii MasaoDate: 2012-01-13 11:30:21
Subject: read transaction and sync rep
Previous:From: Marc MaminDate: 2012-01-13 10:56:31
Subject: CLONE TABLE DATA TO <new_table>

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group