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-07-02 17:11:51
Message-ID: 20140702171151.GA20463@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Jul 2, 2014 at 11:56:34AM -0400, Alvaro Herrera wrote:
> > How are we not creating a gap in members files by setting the members
> > value? Why will that not cause problems?
>
> We're not setting the offset and member value here; we're setting the
> "nextMulti" and "oldestMulti" values. Both affect the offsets counter,
> not the members counter. The members counter is kept at zero, so the
> next multi to be allocated will create members starting from the first
> members position in page zero. initdb of the new cluster created the
> first members page, which corresponds to the first members value that
> will be used.
>
> Note pg_resetxlog --help says:
>
> -m MXID,MXID set next and oldest multitransaction ID
>
> I think you're confusing the fact that we pass two values here (next and
> oldest, both apply to offset counters) with offsets vs. members.
>
> To affect the members counter you would use this other pg_resetxlog switch:
> -O OFFSET set next multitransaction offset
> which, AFAICS, we only use when upgrading from a 9.3+ cluster to a newer
> 9.3+ cluster (and we also copy the files from old cluster to the new
> one).

OK, thanks for the analysis. Attached patch applied back through 9.3.

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

+ Everyone has their own god. +

Attachment Content-Type Size
pg_upgrade.diff text/x-diff 1.0 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message John R Pierce 2014-07-02 17:50:17 Re:
Previous Message Tom Lane 2014-07-02 16:45:26 Re: BUG #10836: Rule with RETURNING claims incorrect type