From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Alexander Shutyaev <shutyaev@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: pg_upgrade and wraparound
Date: Sun, 10 Jun 2018 14:34:55 -0700
Message-ID: <8b14df48-20e9-3dd0-9990-7131f95bd30a@aklaver.com> (raw)
In-Reply-To: <CAGBp8g-urWCpyMQVPzvDt9xo0E-DCmEasq1j0B5mOcvyK4JWWg@mail.gmail.com>
References: <CAGBp8g_=Zxfiny8pa8sOb7pDxjzSGmcTBAJGYUrOJ6TDK9+nyQ@mail.gmail.com>
<107c7c17-2e53-6cd1-1dbd-94d63f7a205f@aklaver.com>
<9825.1528573946@sss.pgh.pa.us>
<1528663590828-0.post@n3.nabble.com>
<bc010ee6-4183-b11d-e401-33b5d67ed8fe@aklaver.com>
<CAGBp8g8oQz+iwjeXunQaKrAekjmDbxPXLffjTRsSWmwFgJ=2=Q@mail.gmail.com>
<CAGBp8g-urWCpyMQVPzvDt9xo0E-DCmEasq1j0B5mOcvyK4JWWg@mail.gmail.com>
On 06/10/2018 02:09 PM, Alexander Shutyaev wrote:
> Some more notes on databses.
>
> Although the pg_upgrade failed, I've decided to check the databases in
> the new cluster (10.4). There is no database with oid 0 either. Also to
> be noted that some system databases changed the oids while others
> retained them.
If I am following the source code for pg_upgrade correctly that is
expected. Pretty sure because the order of object creation is different.
>
> And of my databases - sslentry. It had a very big oid (can that seem
> strange?) and its oid has changed.
OID's are added at time of object creation so I would say the ssslentry
database was created some time after the other databases in the 9.6
cluster. Actually probably more accurate to say after 1016305714 -
16400(bof db) objects that have OID's where created.
When the upgrade failed pg_upgrade should have pointed you at an error log.
Did it and is there anything useful there?
From your OP post:
"You might also need to commit or roll back old prepared transactions."
Do you have any of those in the 9.6 cluster?
See:
https://www.postgresql.org/docs/10/static/view-pg-prepared-xacts.html>
> select oid, datname from pg_database;
> oid | datname
> -------+-----------
> 13011 | template0
> 16400 | bof
> 13012 | postgres
> 16401 | sslentry
> 1 | template1
> (5 rows)
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
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-general@postgresql.org
Cc: adrian.klaver@aklaver.com, shutyaev@gmail.com
Subject: Re: pg_upgrade and wraparound
In-Reply-To: <8b14df48-20e9-3dd0-9990-7131f95bd30a@aklaver.com>
References: <CAGBp8g_=Zxfiny8pa8sOb7pDxjzSGmcTBAJGYUrOJ6TDK9+nyQ@mail.gmail.com> <107c7c17-2e53-6cd1-1dbd-94d63f7a205f@aklaver.com> <9825.1528573946@sss.pgh.pa.us> <1528663590828-0.post@n3.nabble.com> <bc010ee6-4183-b11d-e401-33b5d67ed8fe@aklaver.com> <CAGBp8g8oQz+iwjeXunQaKrAekjmDbxPXLffjTRsSWmwFgJ=2=Q@mail.gmail.com> <CAGBp8g-urWCpyMQVPzvDt9xo0E-DCmEasq1j0B5mOcvyK4JWWg@mail.gmail.com> <8b14df48-20e9-3dd0-9990-7131f95bd30a@aklaver.com>
* 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