From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Jesse Denardo <denaje@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: pgsql-bugs@postgresql.org
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: 9.3beta2: Failure to pg_upgrade
Date: Wed, 31 Jul 2013 16:55:33 -0400
Message-ID: <20130731205532.GA14652@eldon.alvh.no-ip.org> (raw)
In-Reply-To: <CANiVXAiudBVJU9qCcXnhW9qpR+9g4it6UaU14qyvXB=pAH6bCQ@mail.gmail.com>
References: <CANiVXAj4c88YqipsyFQPboqMudnjcNTdB3pqe8ReXqAFQ=HXyA@mail.gmail.com>
<20130731160307.GC3716@momjian.us>
<20130731165633.GW14652@eldon.alvh.no-ip.org>
<20130731170631.GG3716@momjian.us>
<CANiVXAiudBVJU9qCcXnhW9qpR+9g4it6UaU14qyvXB=pAH6bCQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Jesse Denardo escribió:
> $ 9.2_dev/bin/pg_controldata data
> Latest checkpoint's NextMultiXactId: 2982
> Latest checkpoint's NextMultiOffset: 6479
So what's happening here is that the MultiXact 2982 lives in a SLRU page
that doesn't exist. pg_upgrade didn't copy the pg_multixact files from
the old cluster, because they are not compatible; instead it just sets
the values in pg_control. As soon as a new multixact is to be created,
things fail because the code is not prepared to deal with the
possibility that the underlying SLRU files have not been extended during
normal operation.
I see two ways to deal with this:
1. On each multixact creation, verify whether the pages we're trying to
modify do in fact exist. If they don't, create them.
2. At startup, verify the "next" multixact values, and extend the files
if necessary.
I think (1) is not a very good idea because it will cause too large an
impact at runtime, when it is not really necessary. I lean more towards
(2). On IM, Bruce suggested instead:
2a. Same as (2), but only do it in pg_upgrade's usage of postgres'
binary-upgrade mode (postgres -b). Thus this will be done once during
the upgrade process and not every time the system starts up.
As it turns out, I have a patched slru.c that adds a new function to
verify whether a page exists on disk. I created this for the commit
timestamp module, for the BDR branch, but I think it's what we need
here.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: alvherre@2ndquadrant.com, denaje@gmail.com, bruce@momjian.us, pgsql-hackers@postgresql.org
Subject: Re: 9.3beta2: Failure to pg_upgrade
In-Reply-To: <20130731205532.GA14652@eldon.alvh.no-ip.org>
References: <CANiVXAj4c88YqipsyFQPboqMudnjcNTdB3pqe8ReXqAFQ=HXyA@mail.gmail.com> <20130731160307.GC3716@momjian.us> <20130731165633.GW14652@eldon.alvh.no-ip.org> <20130731170631.GG3716@momjian.us> <CANiVXAiudBVJU9qCcXnhW9qpR+9g4it6UaU14qyvXB=pAH6bCQ@mail.gmail.com> <20130731205532.GA14652@eldon.alvh.no-ip.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox