On Tue, Jul 1, 2014 at 03:30:47PM -0400, Bruce Momjian wrote:
> > * When upgrading from 9.2 or older, all tables need to have relminmxid
> > set to oldestMulti. However, since pg_dump --binary-upgrade cannot
> > extract useful values from the catalog, we will need to have the
> > schema load create all tables with relminmxid=0. A subsequent UPDATE
> > will fix the values.
>
> OK, the updated attached patch does this. It repurposes
> set_frozenxids().
OK, patch applied back through 9.3. This leaves the two queries users
are going to have to run in 9.3.X. The first will tell users if they
should remove offsets/0000:
WITH list(file) AS
(
SELECT * FROM pg_ls_dir('pg_multixact/offsets')
)
SELECT EXISTS (SELECT * FROM list WHERE file = '0000') AND
NOT EXISTS (SELECT * FROM list WHERE file = '0001') AND
NOT EXISTS (SELECT * FROM list WHERE file = 'FFFF') AND
EXISTS (SELECT * FROM list WHERE file != '0000')
AS file_0000_removal_required;
The second will tell them if they should go to a wiki page that will
show them how to set database and relation minmxid values:
WITH list(file) AS
(
SELECT * FROM pg_ls_dir('pg_multixact/offsets')
)
SELECT EXISTS (SELECT * FROM list WHERE file ~ '^[8-9A-F]') AND
EXISTS (SELECT * FROM pg_database WHERE datminmxid = 1)
AS update_database_and_relation_minmxid;
I will work on the wiki page now.
I think this issue is now ready for 9.3.X, once we write the wiki page
and release note text.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +