Re: pg_upgrade < 9.3 -> >=9.3 misses a step around multixacts

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: pg_upgrade < 9.3 -> >=9.3 misses a step around multixacts
Date: 2014-06-20 18:09:18
Message-ID: 20140620180918.GE29143@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Jun 20, 2014 at 01:33:52PM -0400, Alvaro Herrera wrote:
> Bruce Momjian wrote:
> > On Thu, Jun 19, 2014 at 06:12:41PM -0400, Alvaro Herrera wrote:
> > > BTW I hacked up pg_resetxlog a bit to make it generate the necessary
> > > pg_multixact/offset file when -m is given. This is not acceptable for
> > > commit because it duplicates the #defines from pg_multixact.c, but maybe
> > > we want this functionality enough that we're interested in a more
> > > complete version of this patch; also it unconditionally writes one zero
> > > byte to the file, which is of course wrong if the file exists and
> > > already contains data.
> >
> > Why would we want this if the system functions fine without those files
> > being created? I don't think we want pg_resetxlog to be doing anything
> > except changing pg_controldata.
>
> I don't understand why you say the system functions fine. If you move
> the multixactid with pg_resetxlog to a point which doesn't have the
> necessary file and page, the system will not start. Only pg_upgrade
> knows to create the file appropriately, but normal operation doesn't.

True, but who would change the multi-xact except pg_upgrade, and would
you want pg_resetxlog to be changing other files in the file system,
perhaps as part of some disaster recovery operation?

The larger question is whether the backend code should more cleanly
handle such cases.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2014-06-20 18:11:04 Re: pg_upgrade < 9.3 -> >=9.3 misses a step around multixacts
Previous Message Bruce Momjian 2014-06-20 18:07:25 Re: pg_upgrade < 9.3 -> >=9.3 misses a step around multixacts