Re: ALTER DATABASE RENAME with HS/SR

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Bernd Helmle <mailings(at)oopsware(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER DATABASE RENAME with HS/SR
Date: 2010-10-05 13:58:00
Message-ID: 1286287080.2025.1384.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2010-10-05 at 08:56 -0400, Robert Haas wrote:
> On Mon, Oct 4, 2010 at 12:42 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> > On Mon, 2010-10-04 at 20:38 +0900, Fujii Masao wrote:
> >> >
> >> > That looks contrary to the documented behavior. Shouldn't i get a forced
> >> > disconnect on this connection instead?
> >>
> >> Probably yes. To do that, ISTM that we should make ALTER DATABASE .. RENAME
> >> issue something like XLOG_DBASE_RENAME record, and make the standby server
> >> call ResolveRecoveryConflictWithDatabase() when that record is applied.
> >> Simon?
> >
> > Certainly contrary to documented behaviour, thanks for the report.
> >
> > Question: do we want that documented behaviour, or should we leave it as
> > is? Probably want to throw a conflict, but it seems worth asking, since
> > I know for certain I just made up the documented behaviour.
> >
> > I'll patch if we agree its required.
>
> Per comments from Josh, Bernd, and myself upthread, I think the
> consensus is that we should patch the documentation.

Yep, just working on it now.

> Aside from the
> fact that the restriction seems fairly arbitrary in any event, I'm
> unexcited about back-patching a WAL format change.

Agreed, but just in case we need to in the future, we can use the XLOG
Info record type for such problems.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Training and Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-10-05 14:00:00 Re: standby registration (was: is sync rep stalled?)
Previous Message Craig Ringer 2010-10-05 13:39:38 Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)