Re: Streaming replication and pg_xlogfile_name()

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication and pg_xlogfile_name()
Date: 2010-02-25 09:33:30
Message-ID: 1267090410.3752.7413.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2010-02-25 at 12:02 +0900, Fujii Masao wrote:
> On Wed, Feb 24, 2010 at 7:56 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> > On Thu, 2010-01-28 at 10:28 +0200, Heikki Linnakangas wrote:
> >> Fujii Masao wrote:
> >> > In relation to the functions added recently, I found an annoying problem;
> >> > pg_xlogfile_name(pg_last_xlog_receive/replay_location()) might report the
> >> > wrong name because pg_xlogfile_name() always uses the current timeline,
> >> > and a backend doesn't know the actual timeline related to the location
> >> > which pg_last_xlog_receive/replay_location() reports. Even if a backend
> >> > knows that, pg_xlogfile_name() would be unable to determine which timeline
> >> > should be used.
> >>
> >> Hmm, I'm not sure what the use case for this is
> >
> > Agreed. What is the use case for this?
>
> Since the current behavior would annoy many users (e.g., [*1]),
> I proposed to change it.
>
> [*1]
> http://archives.postgresql.org/pgsql-hackers/2010-02/msg02014.php

OK, go for it.

If we expose the timeline as part of an "xlog location", then we should
do that everywhere as a change for 9.0. Clearly, "xlog location" has no
meaning without the timeline anyway, so this seems like a necessary
change not just a quick fix. It breaks compatibility, but since we're
changing replication in 9.0 that shouldn't be a problem.

--
Simon Riggs www.2ndQuadrant.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-02-25 09:35:30 Odd CVS revision number
Previous Message Fujii Masao 2010-02-25 09:25:48 Re: testing cvs HEAD - HS/SR - xlog timeline 0 pg_xlogfile_name_offset