Re: pgsql: Fix a couple of bugs in MultiXactId freezing

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Fix a couple of bugs in MultiXactId freezing
Date: 2013-12-04 17:19:36
Message-ID: CABUevExbnPQscVa8DBghOyKR9B9reHKE=deYex7yZWNFr7XnSg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Tue, Dec 3, 2013 at 7:20 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Magnus Hagander <magnus(at)hagander(dot)net> writes:
> > On Tue, Dec 3, 2013 at 7:11 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> Maybe we should just bite the bullet and change the WAL format for
> >> heap_freeze (inventing an all-new record type, not repurposing the old
> >> one, and allowing WAL replay to continue to accept the old one). The
> >> implication for users would be that they'd have to update slave servers
> >> before the master when installing the update; which is unpleasant, but
> >> better than living with a known data corruption case.
>
> > Agreed. It may suck, but it sucks less.
>
> > How badly will it break if they do the upgrade in the wrong order though.
> > Will the slaves just stop (I assume this?) or is there a risk of a
> > wrong-order upgrade causing extra breakage?
>
> I assume what would happen is the slave would PANIC upon seeing a WAL
> record code it didn't recognize. Installing the updated version should
> allow it to resume functioning. Would be good to test this, but if it
> doesn't work like that, that'd be another bug to fix IMO. We've always
> foreseen the possible need to do something like this, so it ought to
> work reasonably cleanly.
>
>
I wonder if we should for the future have the START_REPLICATION command (or
the IDENTIFY_SYSTEM would probably make more sense - or even adding a new
command like IDENTIFY_CLIENT. The point is, something in the replication
protocol) have walreceiver include it's version sent to the master. That
way we could have the walsender identify a walreceiver that's too old and
disconnect it right away - with a much nicer error message than a PANIC.
Right now, walreceiver knows the version of the walsender (through
pqserverversion), but AFAICT there is no way for the walsender to know
which version of the receiver is connected.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-12-04 19:43:52 Re: pgsql: Fix a couple of bugs in MultiXactId freezing
Previous Message Bruce Momjian 2013-12-04 15:14:51 pgsql: build: pass EXTRA_REGRESS_OPTS to secondary regression tests

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2013-12-04 17:35:12 Re: Extension Templates S03E11
Previous Message Andrew Dunstan 2013-12-04 17:18:36 Re: Proposed feature: Selective Foreign Keys