PostgreSQL major
versions are represented by the first two digit groups of the version number,
e.g., 8.4. PostgreSQL minor versions are represented by the third
group of version digits, e.g., 8.4.2 is the second minor release of 8.4. Minor
releases never change the internal storage format and are always compatible
with earlier and later minor releases of the same major version number, e.g.,
8.4.2 is compatible with 8.4, 8.4.1 and 8.4.6. To update between compatible
versions, you simply replace the executable while the server is down and restart the
server. The data directory remains unchanged — minor upgrades are that simple.
For major releases
of PostgreSQL, the internal data storage format is subject to change, thus
complicating upgrades. The traditional method for moving data to a new major
version is to dump and reload the database, though this can be slow. A faster
method is pg_upgrade.
Replication methods are also available.
New major
versions also typically introduce some user-visible incompatibilities, so
application programming changes might be required. All user-visible changes are
listed in the release notes (Appendix E);
pay particular attention to the section labeled "Migration". If you
are upgrading across several major versions, be sure to read the release notes
for each intervening version.
Here
Host server -- test_db01
Archive location -- /u01/psqlwarch
PGDATA Location -- /var/lib/pgsql/data/
Upgrade
8.4 to 9.1 via pg_upgrade
1 - ( By root user ) Confirm current installed version of postgres
[root@test_db01 ~]# su - postgres
-bash-4.1$ /usr/bin/pg_ctl -D
/var/lib/pgsql/data -l logfile start
server starting
-bash-4.1$ psql
psql (8.4.20)
Type "help" for help.
postgres=# \q
-bash-4.1$ rpm -qa postgres*
postgresql-server-8.4.20-2.el6_6.x86_64
postgresql-contrib-8.4.20-2.el6_6.x86_64
postgresql-odbc-08.04.0200-1.el6.x86_64
postgresql-libs-8.4.20-2.el6_6.x86_64
postgresql-docs-8.4.20-2.el6_6.x86_64
postgresql-8.4.20-2.el6_6.x86_64
2
- ( By root
user ) Download
pgdg-centos91-9.1-4.noarch.rpm form (http://yum.postgresql.org/repopackages.php)
& install Postgres 9.1 related
RPM by yum
[root@test_db01 u01]# rpm -ivh
pgdg-centos91-9.1-4.noarch.rpm
[root@test_db01 u01]# yum install
postgresql91.x86_64 postgresql91-contrib.x86_64 postgresql91-debuginfo.x86_64
postgresql91-devel.x86_64 postgresql91-docs.x86_64 postgresql91-jdbc.x86_64
postgresql91-jdbc-debuginfo.x86_64 postgresql91-libs.x86_64
postgresql91-odbc.x86_64 postgresql91-odbc-debuginfo.x86_64
postgresql91-plperl.x86_64 postgresql91-plpython.x86_64
postgresql91-pltcl.x86_64 postgresql91-python.x86_64 postgresql91-python-debuginfo.x86_64
postgresql91-server.x86_64 postgresql91-tcl.x86_64
postgresql91-tcl-debuginfo.x86_64 postgresql91-server.x86_64
postgresql91.x86_64 postgresql91-contrib.x86_64 postgresql91-libs.x86_64
postgresql91-odbc.x86_64 postgresql91-docs.x86_64 postgresql91-jdbc.x86_64
postgresql91-debuginfo.x86_64
postgresql91-devel.x86_64 postgresql91-jdbc-debuginfo.x86_64
postgresql91-odbc-debuginfo.x86_64 postgresql91-plperl.x86_64
postgresql91-plpython.x86_64
3
- ( By root
user ) Initialize
postgres 9.1 and configure
-bash-4.1$ pwd
/usr/pgsql-9.1/bin
-bash-4.1$ /usr/pgsql-9.1/bin/initdb
-D /var/lib/pgsql/9.1/data
The files belonging to this database
system will be owned by user "postgres".
This user must also own the server
process.
The database cluster will be
initialized with locale en_US.UTF-8.
The default database encoding has
accordingly been set to UTF8.
The default text search configuration
will be set to "english".
fixing permissions on existing
directory /var/lib/pgsql/9.1/data ... ok
creating subdirectories ... ok
selecting default max_connections ...
100
selecting default shared_buffers ...
32MB
creating configuration files ... ok
creating template1 database in
/var/lib/pgsql/9.1/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions
... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in
objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language
... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
WARNING: enabling "trust"
authentication for local connections
You can change this by editing
pg_hba.conf or using the -A option the
next time you run initdb.
Success. You can now start the
database server using:
/usr/pgsql-9.1/bin/postgres -D /var/lib/pgsql/9.1/data
or
/usr/pgsql-9.1/bin/pg_ctl -D
/var/lib/pgsql/9.1/data -l logfile start
[root@test_db01 9.1]# chkconfig
postgresql-9.1 on
4
- Shutdown postgres 8.4 & 9.1
-bash-4.1$ /usr/bin/pg_ctl -D
/var/lib/pgsql/data stop
-bash-4.1$ /usr/pgsql-9.1/bin/pg_ctl
-D /var/lib/pgsql/9.1/data stop
5 - Upgrading inplace
Before we start the upgrade we have to make sure both the
instances 8.4 and 9.1 are shut down and then just issue the commands below:
Check for cluster compatibility: The below command will first
check if the two clusters 8.4 and 9.1 are compatible for the upgrade.
-bash-4.1$ /usr/pgsql-9.1/bin/pg_upgrade -b /usr/bin/ -B
/usr/pgsql-9.1/bin/ -c -d /var/lib/pgsql/data/ -D /var/lib/pgsql/9.1/data/ -k
-l /var/lib/pgsql/9.1/upgrade.log -v
Running in verbose mode
Performing Consistency Checks
-----------------------------
Checking current, bin, and data
directories ok
Checking cluster versions ok
"/usr/bin/pg_ctl" -w -l
"/var/lib/pgsql/9.1/upgrade.log" -D "/var/lib/pgsql/data"
-o "-p 5432 -c autovacuum=off -c autovacuum_freeze_max_age=2000000000"
start >> "/var/lib/pgsql/9.1/upgrade.log" 2>&1
Checking database user is a
superuser ok
Checking database connection
settings ok
Checking for prepared
transactions ok
Checking for reg* system oid user
data types ok
Checking for contrib/isn with
bigint-passing mismatch ok
Checking for large objects ok
"/usr/bin/pg_ctl" -w -l
"/var/lib/pgsql/9.1/upgrade.log" -D "/var/lib/pgsql/data" stop >>
"/var/lib/pgsql/9.1/upgrade.log" 2>&1
"/usr/pgsql-9.1/bin/pg_ctl"
-w -l "/var/lib/pgsql/9.1/upgrade.log" -D
"/var/lib/pgsql/9.1/data" -o "-p 5432 -b" start >>
"/var/lib/pgsql/9.1/upgrade.log" 2>&1
Checking for presence of required
libraries ok
Checking database user is a
superuser ok
Checking for prepared
transactions ok
*Clusters are compatible*
"/usr/pgsql-9.1/bin/pg_ctl"
-w -l "/var/lib/pgsql/9.1/upgrade.log" -D "/var/lib/pgsql/9.1/data" stop >>
"/var/lib/pgsql/9.1/upgrade.log" 2>&1
After the check is passed we can go ahead and start the
upgrade:
-bash-4.1$ /usr/pgsql-9.1/bin/pg_upgrade -b /usr/bin/ -B
/usr/pgsql-9.1/bin/ -d /var/lib/pgsql/data/ -D /var/lib/pgsql/9.1/data/ -k -l
/var/lib/pgsql/9.1/upgrade1.log -v
Running in verbose mode
Performing Consistency Checks
-----------------------------
Checking current, bin, and data
directories ok
Checking cluster versions ok
"/usr/bin/pg_ctl" -w -l
"/var/lib/pgsql/9.1/upgrade1.log" -D "/var/lib/pgsql/data"
-o "-p 5432 -c autovacuum=off -c
autovacuum_freeze_max_age=2000000000" start >>
"/var/lib/pgsql/9.1/upgrade1.log" 2>&1
Checking database user is a
superuser ok
Checking database connection
settings ok
Checking for prepared
transactions ok
Checking for reg* system oid user
data types ok
Checking for contrib/isn with
bigint-passing mismatch ok
Checking for large objects ok
Creating catalog dump
"/usr/pgsql-9.1/bin/pg_dumpall" --port 5432 --username
"postgres" --schema-only --quote-all-identifiers --binary-upgrade -f
"/var/lib/pgsql/pg_upgrade_dump_all.sql"
ok
"/usr/bin/pg_ctl" -w -l
"/var/lib/pgsql/9.1/upgrade1.log" -D
"/var/lib/pgsql/data" stop
>> "/var/lib/pgsql/9.1/upgrade1.log" 2>&1
"/usr/pgsql-9.1/bin/pg_ctl"
-w -l "/var/lib/pgsql/9.1/upgrade1.log" -D "/var/lib/pgsql/9.1/data"
-o "-p 5432 -b" start >>
"/var/lib/pgsql/9.1/upgrade1.log" 2>&1
Checking for presence of required
libraries ok
Checking database user is a
superuser ok
Checking for prepared
transactions ok
| If pg_upgrade fails after this
point, you must
| re-initdb the new cluster before
continuing.
| You will also need to remove the
".old" suffix
| from
/var/lib/pgsql/data/global/pg_control.old.
Performing Upgrade
------------------
Adding ".old" suffix to old
global/pg_control ok
Analyzing all rows in the new
cluster
"/usr/pgsql-9.1/bin/vacuumdb" --port 5432 --username
"postgres" --all --analyze >>
"/var/lib/pgsql/9.1/upgrade1.log" 2>&1
ok
Freezing all rows on the new
cluster
"/usr/pgsql-9.1/bin/vacuumdb" --port 5432 --username
"postgres" --all --freeze >>
"/var/lib/pgsql/9.1/upgrade1.log" 2>&1
ok
"/usr/pgsql-9.1/bin/pg_ctl"
-w -l "/var/lib/pgsql/9.1/upgrade1.log" -D
"/var/lib/pgsql/9.1/data" stop
>> "/var/lib/pgsql/9.1/upgrade1.log" 2>&1
Deleting new commit clogs ok
Copying old commit clogs to new
server cp -Rf
"/var/lib/pgsql/data/pg_clog"
"/var/lib/pgsql/9.1/data/pg_clog"
ok
Setting next transaction id for new
cluster
"/usr/pgsql-9.1/bin/pg_resetxlog" -f -x 672
"/var/lib/pgsql/9.1/data" > /dev/null
ok
Resetting WAL archives
"/usr/pgsql-9.1/bin/pg_resetxlog" -l 1,0,35
"/var/lib/pgsql/9.1/data" >>
"/var/lib/pgsql/9.1/upgrade1.log" 2>&1
ok
"/usr/pgsql-9.1/bin/pg_ctl"
-w -l "/var/lib/pgsql/9.1/upgrade1.log" -D
"/var/lib/pgsql/9.1/data" -o "-p 5432 -b" start >>
"/var/lib/pgsql/9.1/upgrade1.log" 2>&1
Setting frozenxid counters in new
cluster ok
Creating databases in the new
cluster
"/usr/pgsql-9.1/bin/psql" --set ON_ERROR_STOP=on --no-psqlrc
--port 5432 --username "postgres" -f
"/var/lib/pgsql/pg_upgrade_dump_globals.sql" --dbname template1
>> "/var/lib/pgsql/9.1/upgrade1.log"
ok
Adding support functions to new
cluster ok
Restoring database schema to new
cluster
"/usr/pgsql-9.1/bin/psql" --set ON_ERROR_STOP=on --no-psqlrc
--port 5432 --username "postgres" -f "/var/lib/pgsql/pg_upgrade_dump_db.sql"
--dbname template1 >> "/var/lib/pgsql/9.1/upgrade1.log"
ok
Removing support functions from new
cluster ok
"/usr/pgsql-9.1/bin/pg_ctl"
-w -l "/var/lib/pgsql/9.1/upgrade1.log" -D
"/var/lib/pgsql/9.1/data" stop
>> "/var/lib/pgsql/9.1/upgrade1.log" 2>&1
Restoring user relation files
linking
/var/lib/pgsql/data/base/11564/2613 to /var/lib/pgsql/9.1/data/base/12780/12652
linking
/var/lib/pgsql/data/base/11564/2683 to /var/lib/pgsql/9.1/data/base/12780/12654
linking
/var/lib/pgsql/data/base/1/2613 to /var/lib/pgsql/9.1/data/base/1/12652
linking
/var/lib/pgsql/data/base/1/2683 to /var/lib/pgsql/9.1/data/base/1/12654
linking
/var/lib/pgsql/data/base/16384/2613 to /var/lib/pgsql/9.1/data/base/16406/12652
linking /var/lib/pgsql/data/base/16384/2683
to /var/lib/pgsql/9.1/data/base/16406/12654
linking
/var/lib/pgsql/data/base/16384/16393 to
/var/lib/pgsql/9.1/data/base/16406/16393
linking
/var/lib/pgsql/data/base/16384/16396 to
/var/lib/pgsql/9.1/data/base/16406/16396
linking
/var/lib/pgsql/data/base/16384/16398 to
/var/lib/pgsql/9.1/data/base/16406/16398
linking
/var/lib/pgsql/data/base/16384/16401 to
/var/lib/pgsql/9.1/data/base/16406/16401
linking
/var/lib/pgsql/data/base/16384/16403 to /var/lib/pgsql/9.1/data/base/16406/16403
linking
/var/lib/pgsql/data/base/16384/16404 to
/var/lib/pgsql/9.1/data/base/16406/16404
linking
/var/lib/pgsql/data/base/16384/16412 to
/var/lib/pgsql/9.1/data/base/16406/16412
linking
/var/lib/pgsql/data/base/16384/16415 to /var/lib/pgsql/9.1/data/base/16406/16415
linking
/var/lib/pgsql/data/base/16384/16417 to
/var/lib/pgsql/9.1/data/base/16406/16417
linking
/var/lib/pgsql/data/base/16384/24601 to
/var/lib/pgsql/9.1/data/base/16406/24601
linking
/var/lib/pgsql/data/base/16384/24604 to /var/lib/pgsql/9.1/data/base/16406/24604
linking
/var/lib/pgsql/data/base/16384/24606 to
/var/lib/pgsql/9.1/data/base/16406/24606
linking
/var/lib/pgsql/data/base/16384/24607 to
/var/lib/pgsql/9.1/data/base/16406/24607
linking
/var/lib/pgsql/data/base/16384/24610 to /var/lib/pgsql/9.1/data/base/16406/24610
linking
/var/lib/pgsql/data/base/16384/24612 to
/var/lib/pgsql/9.1/data/base/16406/24612
ok
Setting next oid for new cluster "/usr/pgsql-9.1/bin/pg_resetxlog"
-o 24613 "/var/lib/pgsql/9.1/data" > /dev/null
ok
Creating script to delete old
cluster ok
"/usr/pgsql-9.1/bin/pg_ctl"
-w -l "/var/lib/pgsql/9.1/upgrade1.log" -D
"/var/lib/pgsql/9.1/data" -o "-p 5432 -b" start >>
"/var/lib/pgsql/9.1/upgrade1.log" 2>&1
Checking for large objects ok
"/usr/pgsql-9.1/bin/pg_ctl"
-w -l "/var/lib/pgsql/9.1/upgrade1.log" -D
"/var/lib/pgsql/9.1/data" stop
>> "/var/lib/pgsql/9.1/upgrade1.log" 2>&1
Upgrade complete
----------------
| Optimizer statistics are not
transferred by pg_upgrade
| so consider running:
| vacuumdb --all --analyze-only
| on the newly-upgraded cluster.
| Running this script will delete the
old cluster's data files:
|
/var/lib/pgsql/delete_old_cluster.sh
In case
there are any issues with the upgrade the upgrade.log file can be checked for
errors.
No inplace upgrade: The above commands can be run
without using -k and this will start the copy process of the data files once
the ./pg_upgrade command is invoked.
6
- Config Network Access & Startup
the new Postgresql Instance
vi
/var/lib/pgsql/9.1/data/postgresql.conf
1. listen_addresses =
'*'
2. port = 5432
vi
/var/lib/pgsql/9.1/data/pg_hba.conf
-bash-4.1$ /usr/pgsql-9.1/bin/pg_ctl -D
/var/lib/pgsql/9.1/data -l logfile start
7
- Remove PG8.4 and & create softlink
with PG 9.1
[root@test_db01 9.1]# rpm -qa
postgres*
[root@test_db01 9.1]# yum remove
postgresql
[root@test_db01 9.1]# yum remove
postgresql-odbc-08.04.0200-1.el6.x86_64 postgresql-libs-8.4.20-2.el6_6.x86_64
[root@test_db01 9.1]# ln -s
/usr/pgsql-9.1/bin/psql /usr/bin/psql
[root@test_db01 bin]# ln -s
/usr/pgsql-9.1/bin/pg_standby /usr/bin/pg_standby
[root@test_db01 bin]# which
pg_standby
/usr/bin/pg_standby
[root@test_db01 9.1]# su - postgres
-bash-4.1$ psql
psql (9.1.18)
Type "help" for help.
postgres=# select version();
version
----------------------------------------------------------------------------------------------------------------
PostgreSQL 9.1.18 on x86_64-unknown-linux-gnu,
compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11), 64-bit
(1 row)
Optimizer
statistics are not transferred by pg_upgrade
so consider running:(on the newly-upgraded cluster)
postgres=# vacuumdb --all --analyze-only
postgres=# \q
8
- delete the old cluster's data files
/var/lib/pgsql/delete_old_cluster.sh
*************Now
8.4 to 9.1 upgrade complete**********************************
Upgrade
9.1 to 9.4 via pg_upgrade
1 - ( By root user ) Confirm current installed version of postgres
[root@test_db01 ~]# su - postgres
-bash-4.1$ /usr/pgsql-9.1/bin/pg_ctl
-D /var/lib/pgsql/9.1/data -l logfile start
server starting
-bash-4.1$ psql
psql (9.1.18)
Type "help" for help.
postgres=# \q
2
- ( By root
user ) Download
pgdg-centos94-9.4-1.noarch.rpm form (http://yum.postgresql.org/repopackages.php)
& install Postgres 9.4 related
RPM by yum
[root@test_db01 u01]# rpm -ivh
pgdg-centos94-9.4-1.noarch.rpm
[root@test_db01 u01]# yum install
postgresql94.x86_64 postgresql94-contrib.x86_64 postgresql94-debuginfo.x86_64
postgresql94-devel.x86_64 postgresql94-docs.x86_64 postgresql94-jdbc.x86_64
postgresql94-jdbc-debuginfo.x86_64 postgresql94-libs.x86_64 postgresql94-odbc.x86_64
postgresql94-odbc-debuginfo.x86_64 postgresql94-plperl.x86_64
postgresql94-plpython.x86_64 postgresql94-pltcl.x86_64
postgresql94-python.x86_64 postgresql94-python-debuginfo.x86_64
postgresql94-server.x86_64 postgresql94-tcl.x86_64 postgresql94-tcl-debuginfo.x86_64
postgresql94-server.x86_64 postgresql94.x86_64 postgresql94-contrib.x86_64
postgresql94-libs.x86_64 postgresql94-odbc.x86_64 postgresql94-docs.x86_64 postgresql94-jdbc.x86_64 postgresql94-debuginfo.x86_64 postgresql94-devel.x86_64 postgresql94-jdbc-debuginfo.x86_64
postgresql94-odbc-debuginfo.x86_64 postgresql94-plperl.x86_64
postgresql94-plpython.x86_64
3
- ( By root
user ) Initialize
postgres 9.4 and configure
-bash-4.1$ pwd
/usr/pgsql-9.4/bin
-bash-4.1$ /usr/pgsql-9.4/bin/initdb
-D /var/lib/pgsql/9.4/data
[root@test_db01 9.1]# chkconfig
postgresql-9.4 on
4
- Shutdown postgres 9.4 & 9.1
-bash-4.1$ /usr/pgsql-9.1/bin/pg_ctl
-D /var/lib/pgsql/9.1/data stop
-bash-4.1$ /usr/pgsql-9.4/bin/pg_ctl
-D /var/lib/pgsql/9.4/data stop
5 - Upgrading inplace
-bash-4.1$ /usr/pgsql-9.4/bin/pg_upgrade -b /usr/pgsql-9.1/bin/ -B
/usr/pgsql-9.4/bin/ -c -d /var/lib/pgsql/9.1/data/ -D /var/lib/pgsql/9.4/data/
-k -v
Running in verbose mode
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
pg_control values:
First log file ID after reset: 0
First log file segment after
reset: 37
pg_control version number: 903
Catalog version number: 201105231
Database system identifier: 6165741557062811599
Latest checkpoint's TimeLineID: 1
Latest checkpoint's NextXID: 0/756
Latest checkpoint's NextOID: 24613
Latest checkpoint's
NextMultiXactId: 1
Latest checkpoint's NextMultiOffset: 0
Latest checkpoint's oldestXID: 648
Latest checkpoint's oldestXID's
DB: 16406
Latest checkpoint's
oldestActiveXID: 0
Maximum data alignment: 8
Database block size: 8192
Blocks per segment of large relation:
131072
WAL block size: 8192
Bytes per WAL segment: 16777216
Maximum length of identifiers: 64
Maximum columns in an index: 32
Maximum size of a TOAST chunk: 1996
Date/time type storage: 64-bit integers
Float4 argument passing: by value
Float8 argument passing: by value
Current pg_control values:
pg_control version number: 942
Catalog version number: 201409291
Database system identifier: 6166109842990673223
Latest checkpoint's TimeLineID: 1
Latest checkpoint's full_page_writes:
on
Latest checkpoint's NextXID: 0/1810
Latest checkpoint's NextOID: 13004
Latest checkpoint's
NextMultiXactId: 1
Latest checkpoint's
NextMultiOffset: 0
Latest checkpoint's oldestXID: 1800
Latest checkpoint's oldestXID's
DB: 1
Latest checkpoint's
oldestActiveXID: 0
Latest checkpoint's
oldestMultiXid: 1
Latest checkpoint's oldestMulti's DB:
1
Maximum data alignment: 8
Database block size: 8192
Blocks per segment of large relation:
131072
WAL block size: 8192
Bytes per WAL segment: 16777216
Maximum length of identifiers: 64
Maximum columns in an index: 32
Maximum size of a TOAST chunk: 1996
Size of a large-object chunk: 2048
Date/time type storage: 64-bit integers
Float4 argument passing: by value
Float8 argument passing: by value
Data page checksum version: 0
Values to be changed:
First log segment after reset: 000000010000000000000002
"/usr/pgsql-9.1/bin/pg_ctl"
-w -l "pg_upgrade_server.log" -D "/var/lib/pgsql/9.1/data/"
-o "-p 50432 -b -c
listen_addresses='' -c unix_socket_permissions=0700 -c
unix_socket_directory='/var/lib/pgsql/9.4/data'" start >>
"pg_upgrade_server.log" 2>&1
executing: SELECT datcollate,
datctype FROM pg_catalog.pg_database
WHERE datname = 'template0'
executing: SELECT
pg_catalog.pg_encoding_to_char(encoding) FROM pg_catalog.pg_database WHERE datname = 'template0'
executing: SELECT c.relname,
c.relfilenode FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n WHERE
c.relnamespace = n.oid AND
n.nspname = 'pg_catalog' AND
c.relname = 'pg_database' ORDER BY c.relname
executing: SELECT d.oid, d.datname,
t.spclocation FROM pg_catalog.pg_database d
LEFT OUTER JOIN pg_catalog.pg_tablespace t ON d.dattablespace = t.oid WHERE
d.datallowconn = true ORDER BY 2
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = i.indexrelid WHERE relkind
IN ('r', 'm', 'i', 'S') AND i.indisvalid
IS DISTINCT FROM false AND i.indisready
IS DISTINCT FROM false AND ((n.nspname
!~ '^pg_temp_' AND n.nspname !~
'^pg_toast_temp_' AND n.nspname NOT
IN ('pg_catalog', 'information_schema', 'binary_upgrade',
'pg_toast') AND c.oid >=
16384) OR (n.nspname = 'pg_catalog'
AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata',
'pg_largeobject_metadata_oid_index') ));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND indrelid IN (SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode,
c.reltablespace, t.spclocation FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid JOIN pg_catalog.pg_namespace n ON c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_tablespace
t ON c.reltablespace = t.oid
ORDER BY 1;
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = i.indexrelid WHERE relkind
IN ('r', 'm', 'i', 'S') AND i.indisvalid
IS DISTINCT FROM false AND i.indisready
IS DISTINCT FROM false AND ((n.nspname
!~ '^pg_temp_' AND n.nspname !~
'^pg_toast_temp_' AND n.nspname NOT
IN ('pg_catalog', 'information_schema', 'binary_upgrade',
'pg_toast') AND c.oid >= 16384) OR (n.nspname = 'pg_catalog' AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata',
'pg_largeobject_metadata_oid_index') ));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND indrelid IN (SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode,
c.reltablespace, t.spclocation FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid JOIN pg_catalog.pg_namespace n ON c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_tablespace
t ON c.reltablespace = t.oid
ORDER BY 1;
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = i.indexrelid WHERE relkind
IN ('r', 'm', 'i', 'S') AND i.indisvalid
IS DISTINCT FROM false AND i.indisready
IS DISTINCT FROM false AND ((n.nspname
!~ '^pg_temp_' AND n.nspname !~
'^pg_toast_temp_' AND n.nspname NOT
IN ('pg_catalog', 'information_schema', 'binary_upgrade',
'pg_toast') AND c.oid >=
16384) OR (n.nspname = 'pg_catalog'
AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata',
'pg_largeobject_metadata_oid_index') ));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND indrelid IN (SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode,
c.reltablespace, t.spclocation FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid JOIN pg_catalog.pg_namespace n ON c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_tablespace
t ON c.reltablespace = t.oid
ORDER BY 1;
old databases:
Database: postgres
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname:
pg_catalog.pg_largeobject_loid_pn_index: reloid: 2683 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata: reloid: 2995 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata_oid_index: reloid: 2996 reltblspace:
Database: template1
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname:
pg_catalog.pg_largeobject_loid_pn_index: reloid: 2683 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata: reloid: 2995 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata_oid_index: reloid: 2996 reltblspace:
Database: testdb
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname:
pg_catalog.pg_largeobject_loid_pn_index: reloid: 2683 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata: reloid: 2995 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata_oid_index: reloid: 2996 reltblspace:
relname: public.department: reloid:
16393 reltblspace:
relname: public.department_pkey:
reloid: 16396 reltblspace:
relname: public.company: reloid:
16398 reltblspace:
relname: pg_toast.pg_toast_16398:
reloid: 16401 reltblspace:
relname:
pg_toast.pg_toast_16398_index: reloid: 16403 reltblspace:
relname: public.company_pkey: reloid:
16404 reltblspace:
relname: public.n_company: reloid:
16412 reltblspace:
relname: pg_toast.pg_toast_16412:
reloid: 16415 reltblspace:
relname: pg_toast.pg_toast_16412_index:
reloid: 16417 reltblspace:
relname: public.manoj_company:
reloid: 24601 reltblspace:
relname: pg_toast.pg_toast_24601:
reloid: 24604 reltblspace:
relname:
pg_toast.pg_toast_24601_index: reloid: 24606 reltblspace:
relname: public.man: reloid: 24607
reltblspace:
relname: pg_toast.pg_toast_24607:
reloid: 24610 reltblspace:
relname:
pg_toast.pg_toast_24607_index: reloid: 24612 reltblspace:
executing: SELECT spclocation FROM pg_catalog.pg_tablespace WHERE spcname != 'pg_default' AND spcname != 'pg_global'
executing: SELECT DISTINCT probin
FROM pg_catalog.pg_proc WHERE prolang = 13 /* C */ AND probin IS NOT
NULL AND oid >= 16384;
executing: SELECT DISTINCT probin
FROM pg_catalog.pg_proc WHERE prolang = 13 /* C */ AND probin IS NOT
NULL AND oid >= 16384;
executing: SELECT DISTINCT probin
FROM pg_catalog.pg_proc WHERE prolang = 13 /* C */ AND probin IS NOT
NULL AND oid >= 16384;
Checking database user is a
superuser
executing: SELECT rolsuper, oid FROM pg_catalog.pg_roles WHERE rolname =
current_user
executing: SELECT COUNT(*) FROM
pg_catalog.pg_roles
ok
Checking database connection
settings executing:
SELECT datname, datallowconn FROM pg_catalog.pg_database
ok
Checking for prepared
transactions
executing: SELECT * FROM pg_catalog.pg_prepared_xacts
ok
Checking for reg* system OID user
data types executing:
SELECT n.nspname, c.relname, a.attname FROM
pg_catalog.pg_class c,
pg_catalog.pg_namespace n,
pg_catalog.pg_attribute a WHERE c.oid = a.attrelid AND NOT a.attisdropped AND a.atttypid IN (
'pg_catalog.regproc'::pg_catalog.regtype, 'pg_catalog.regprocedure'::pg_catalog.regtype,
'pg_catalog.regoper'::pg_catalog.regtype, 'pg_catalog.regoperator'::pg_catalog.regtype,
'pg_catalog.regconfig'::pg_catalog.regtype, 'pg_catalog.regdictionary'::pg_catalog.regtype)
AND c.relnamespace = n.oid
AND n.nspname NOT IN
('pg_catalog', 'information_schema')
executing: SELECT n.nspname,
c.relname, a.attname FROM
pg_catalog.pg_class c,
pg_catalog.pg_namespace n,
pg_catalog.pg_attribute a WHERE c.oid = a.attrelid AND NOT a.attisdropped AND a.atttypid IN (
'pg_catalog.regproc'::pg_catalog.regtype,
'pg_catalog.regprocedure'::pg_catalog.regtype,
'pg_catalog.regoper'::pg_catalog.regtype,
'pg_catalog.regoperator'::pg_catalog.regtype,
'pg_catalog.regconfig'::pg_catalog.regtype,
'pg_catalog.regdictionary'::pg_catalog.regtype) AND c.relnamespace = n.oid AND n.nspname NOT IN ('pg_catalog',
'information_schema')
executing: SELECT n.nspname,
c.relname, a.attname FROM
pg_catalog.pg_class c,
pg_catalog.pg_namespace n,
pg_catalog.pg_attribute a WHERE c.oid = a.attrelid AND NOT a.attisdropped AND a.atttypid IN (
'pg_catalog.regproc'::pg_catalog.regtype,
'pg_catalog.regprocedure'::pg_catalog.regtype, 'pg_catalog.regoper'::pg_catalog.regtype,
'pg_catalog.regoperator'::pg_catalog.regtype,
'pg_catalog.regconfig'::pg_catalog.regtype,
'pg_catalog.regdictionary'::pg_catalog.regtype) AND c.relnamespace = n.oid AND n.nspname NOT IN ('pg_catalog',
'information_schema')
ok
Checking for contrib/isn with
bigint-passing mismatch ok
Checking for invalid "line"
user columns
executing: SELECT n.nspname, c.relname, a.attname FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n, pg_catalog.pg_attribute a WHERE
c.oid = a.attrelid AND NOT a.attisdropped
AND a.atttypid =
'pg_catalog.line'::pg_catalog.regtype AND c.relnamespace = n.oid AND n.nspname !~ '^pg_temp_' AND n.nspname !~ '^pg_toast_temp_'
AND n.nspname NOT IN
('pg_catalog', 'information_schema')
executing: SELECT n.nspname,
c.relname, a.attname FROM
pg_catalog.pg_class c,
pg_catalog.pg_namespace n,
pg_catalog.pg_attribute a WHERE c.oid = a.attrelid AND NOT a.attisdropped AND a.atttypid = 'pg_catalog.line'::pg_catalog.regtype
AND c.relnamespace = n.oid
AND n.nspname !~ '^pg_temp_'
AND n.nspname !~ '^pg_toast_temp_'
AND n.nspname NOT IN
('pg_catalog', 'information_schema')
executing: SELECT n.nspname,
c.relname, a.attname FROM
pg_catalog.pg_class c,
pg_catalog.pg_namespace n,
pg_catalog.pg_attribute a WHERE c.oid = a.attrelid AND NOT a.attisdropped AND a.atttypid =
'pg_catalog.line'::pg_catalog.regtype AND c.relnamespace = n.oid AND n.nspname !~ '^pg_temp_' AND n.nspname !~ '^pg_toast_temp_' AND n.nspname NOT IN ('pg_catalog',
'information_schema')
ok
"/usr/pgsql-9.1/bin/pg_ctl"
-w -D "/var/lib/pgsql/9.1/data/" -o "" stop >>
"pg_upgrade_server.log" 2>&1
"/usr/pgsql-9.4/bin/pg_ctl"
-w -l "pg_upgrade_server.log" -D "/var/lib/pgsql/9.4/data/"
-o "-p 50432 -b -c synchronous_commit=off -c fsync=off -c
full_page_writes=off -c
listen_addresses='' -c unix_socket_permissions=0700 -c
unix_socket_directories='/var/lib/pgsql/9.4/data'" start >>
"pg_upgrade_server.log" 2>&1
executing: SELECT datcollate,
datctype FROM pg_catalog.pg_database
WHERE datname = 'template0'
executing: SELECT
pg_catalog.pg_encoding_to_char(encoding) FROM pg_catalog.pg_database WHERE datname = 'template0'
executing: SELECT d.oid, d.datname,
pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM
pg_catalog.pg_database d LEFT OUTER JOIN
pg_catalog.pg_tablespace t ON
d.dattablespace = t.oid WHERE d.datallowconn = true ORDER BY 2
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = i.indexrelid WHERE relkind
IN ('r', 'm', 'i', 'S') AND i.indisvalid
IS DISTINCT FROM false AND i.indisready
IS DISTINCT FROM false AND ((n.nspname
!~ '^pg_temp_' AND n.nspname !~
'^pg_toast_temp_' AND n.nspname NOT
IN ('pg_catalog', 'information_schema', 'binary_upgrade',
'pg_toast') AND c.oid >=
16384) OR (n.nspname = 'pg_catalog'
AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata',
'pg_largeobject_metadata_oid_index') ));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND indrelid IN (SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode,
c.reltablespace, pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM
info_rels i JOIN pg_catalog.pg_class c
ON i.reloid = c.oid JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN
pg_catalog.pg_tablespace t ON
c.reltablespace = t.oid ORDER BY 1;
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = i.indexrelid WHERE relkind
IN ('r', 'm', 'i', 'S') AND i.indisvalid
IS DISTINCT FROM false AND i.indisready
IS DISTINCT FROM false AND ((n.nspname
!~ '^pg_temp_' AND n.nspname !~
'^pg_toast_temp_' AND n.nspname NOT
IN ('pg_catalog', 'information_schema', 'binary_upgrade',
'pg_toast') AND c.oid >=
16384) OR (n.nspname = 'pg_catalog' AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata',
'pg_largeobject_metadata_oid_index') ));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND indrelid IN (SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode,
c.reltablespace, pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM
info_rels i JOIN pg_catalog.pg_class c
ON i.reloid = c.oid JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN
pg_catalog.pg_tablespace t ON
c.reltablespace = t.oid ORDER BY 1;
new databases:
Database: postgres
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname:
pg_catalog.pg_largeobject_loid_pn_index: reloid: 2683 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata: reloid: 2995 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata_oid_index: reloid: 2996 reltblspace:
Database: template1
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname:
pg_catalog.pg_largeobject_loid_pn_index: reloid: 2683 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata: reloid: 2995 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata_oid_index: reloid: 2996 reltblspace:
Checking for presence of required
libraries ok
Checking database user is a
superuser
executing: SELECT rolsuper, oid FROM pg_catalog.pg_roles WHERE rolname =
current_user
executing: SELECT COUNT(*) FROM
pg_catalog.pg_roles
ok
Checking for prepared
transactions
executing: SELECT * FROM pg_catalog.pg_prepared_xacts
ok
*Clusters are compatible*
"/usr/pgsql-9.4/bin/pg_ctl"
-w -D "/var/lib/pgsql/9.4/data/" -o "" stop >> "pg_upgrade_server.log"
2>&1
After the check is passed we can go ahead and start the
upgrade:
-bash-4.1$ /usr/pgsql-9.4/bin/pg_upgrade -b /usr/pgsql-9.1/bin/ -B
/usr/pgsql-9.4/bin/ -d /var/lib/pgsql/9.1/data/ -D /var/lib/pgsql/9.4/data/ -k
-v
Running in verbose mode
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
pg_control values:
First log file ID after reset: 0
First log file segment after
reset: 37
pg_control version number: 903
Catalog version number: 201105231
Database system identifier: 6165741557062811599
Latest checkpoint's TimeLineID: 1
Latest checkpoint's NextXID: 0/764
Latest checkpoint's NextOID: 24624
Latest checkpoint's
NextMultiXactId: 1
Latest checkpoint's
NextMultiOffset: 0
Latest checkpoint's oldestXID: 648
Latest checkpoint's oldestXID's
DB: 16406
Latest checkpoint's
oldestActiveXID: 0
Maximum data alignment: 8
Database block size: 8192
Blocks per segment of large relation:
131072
WAL block size: 8192
Bytes per WAL segment: 16777216
Maximum length of identifiers: 64
Maximum columns in an index: 32
Maximum size of a TOAST chunk: 1996
Date/time type storage: 64-bit integers
Float4 argument passing: by value
Float8 argument passing: by value
Current pg_control values:
pg_control version number: 942
Catalog version number: 201409291
Database system identifier: 6166109842990673223
Latest checkpoint's TimeLineID: 1
Latest checkpoint's full_page_writes:
off
Latest checkpoint's NextXID: 0/1814
Latest checkpoint's NextOID: 16390
Latest checkpoint's
NextMultiXactId: 1
Latest checkpoint's
NextMultiOffset: 0
Latest checkpoint's oldestXID: 1800
Latest checkpoint's oldestXID's
DB: 1
Latest checkpoint's
oldestActiveXID: 0
Latest checkpoint's oldestMultiXid: 1
Latest checkpoint's oldestMulti's DB:
1
Maximum data alignment: 8
Database block size: 8192
Blocks per segment of large relation:
131072
WAL block size: 8192
Bytes per WAL segment: 16777216
Maximum length of identifiers: 64
Maximum columns in an index: 32
Maximum size of a TOAST chunk: 1996
Size of a large-object chunk: 2048
Date/time type storage: 64-bit integers
Float4 argument passing: by value
Float8 argument passing: by value
Data page checksum version: 0
Values to be changed:
First log segment after reset: 000000010000000000000002
"/usr/pgsql-9.1/bin/pg_ctl"
-w -l "pg_upgrade_server.log" -D "/var/lib/pgsql/9.1/data/"
-o "-p 50432 -b -c
listen_addresses='' -c unix_socket_permissions=0700 -c
unix_socket_directory='/var/lib/pgsql/9.4/data'" start >>
"pg_upgrade_server.log" 2>&1
executing: SELECT datcollate,
datctype FROM pg_catalog.pg_database
WHERE datname = 'template0'
executing: SELECT
pg_catalog.pg_encoding_to_char(encoding) FROM pg_catalog.pg_database WHERE datname = 'template0'
executing: SELECT c.relname,
c.relfilenode FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n WHERE
c.relnamespace = n.oid AND
n.nspname = 'pg_catalog' AND
c.relname = 'pg_database' ORDER BY c.relname
executing: SELECT d.oid, d.datname,
t.spclocation FROM pg_catalog.pg_database d
LEFT OUTER JOIN pg_catalog.pg_tablespace t ON d.dattablespace = t.oid WHERE
d.datallowconn = true ORDER BY 2
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = i.indexrelid WHERE relkind
IN ('r', 'm', 'i', 'S') AND i.indisvalid
IS DISTINCT FROM false AND i.indisready
IS DISTINCT FROM false AND ((n.nspname
!~ '^pg_temp_' AND n.nspname !~
'^pg_toast_temp_' AND n.nspname NOT IN
('pg_catalog', 'information_schema', 'binary_upgrade',
'pg_toast') AND c.oid >=
16384) OR (n.nspname = 'pg_catalog'
AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata', 'pg_largeobject_metadata_oid_index')
));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND indrelid IN (SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode,
c.reltablespace, t.spclocation FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid JOIN pg_catalog.pg_namespace n ON c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_tablespace
t ON c.reltablespace = t.oid
ORDER BY 1;
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = i.indexrelid WHERE relkind
IN ('r', 'm', 'i', 'S') AND i.indisvalid
IS DISTINCT FROM false AND i.indisready
IS DISTINCT FROM false AND ((n.nspname
!~ '^pg_temp_' AND n.nspname !~
'^pg_toast_temp_' AND n.nspname NOT
IN ('pg_catalog', 'information_schema',
'binary_upgrade',
'pg_toast') AND c.oid >=
16384) OR (n.nspname = 'pg_catalog' AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata',
'pg_largeobject_metadata_oid_index') ));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND indrelid IN (SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode,
c.reltablespace, t.spclocation FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid JOIN pg_catalog.pg_namespace n ON c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_tablespace
t ON c.reltablespace = t.oid
ORDER BY 1;
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = i.indexrelid WHERE relkind
IN ('r', 'm', 'i', 'S') AND i.indisvalid
IS DISTINCT FROM false AND i.indisready
IS DISTINCT FROM false AND ((n.nspname
!~ '^pg_temp_' AND n.nspname !~
'^pg_toast_temp_' AND n.nspname NOT
IN ('pg_catalog', 'information_schema', 'binary_upgrade',
'pg_toast') AND c.oid >=
16384) OR (n.nspname = 'pg_catalog'
AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata',
'pg_largeobject_metadata_oid_index') ));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND indrelid IN (SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode,
c.reltablespace, t.spclocation FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid JOIN pg_catalog.pg_namespace n ON c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_tablespace
t ON c.reltablespace = t.oid
ORDER BY 1;
old databases:
Database: postgres
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname:
pg_catalog.pg_largeobject_loid_pn_index: reloid: 2683 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata: reloid: 2995 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata_oid_index: reloid: 2996 reltblspace:
Database: template1
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname:
pg_catalog.pg_largeobject_loid_pn_index: reloid: 2683 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata: reloid: 2995 reltblspace:
relname: pg_catalog.pg_largeobject_metadata_oid_index:
reloid: 2996 reltblspace:
Database: testdb
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname:
pg_catalog.pg_largeobject_loid_pn_index: reloid: 2683 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata: reloid: 2995 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata_oid_index: reloid: 2996 reltblspace:
relname: public.department: reloid:
16393 reltblspace:
relname: public.department_pkey:
reloid: 16396 reltblspace:
relname: public.company: reloid: 16398
reltblspace:
relname: pg_toast.pg_toast_16398:
reloid: 16401 reltblspace:
relname:
pg_toast.pg_toast_16398_index: reloid: 16403 reltblspace:
relname: public.company_pkey: reloid:
16404 reltblspace:
relname: public.n_company: reloid:
16412 reltblspace:
relname: pg_toast.pg_toast_16412:
reloid: 16415 reltblspace:
relname:
pg_toast.pg_toast_16412_index: reloid: 16417 reltblspace:
relname: public.manoj_company:
reloid: 24601 reltblspace:
relname: pg_toast.pg_toast_24601:
reloid: 24604 reltblspace:
relname: pg_toast.pg_toast_24601_index:
reloid: 24606 reltblspace:
relname: public.man: reloid: 24607
reltblspace:
relname: pg_toast.pg_toast_24607:
reloid: 24610 reltblspace:
relname:
pg_toast.pg_toast_24607_index: reloid: 24612 reltblspace:
executing: SELECT spclocation FROM pg_catalog.pg_tablespace WHERE spcname != 'pg_default' AND spcname != 'pg_global'
executing: SELECT DISTINCT probin
FROM pg_catalog.pg_proc WHERE prolang = 13 /* C */ AND probin IS NOT
NULL AND oid >= 16384;
executing: SELECT DISTINCT probin
FROM pg_catalog.pg_proc WHERE prolang = 13 /* C */ AND probin IS NOT
NULL AND oid >= 16384;
executing: SELECT DISTINCT probin
FROM pg_catalog.pg_proc WHERE prolang = 13 /* C */ AND probin IS NOT
NULL AND oid >= 16384;
Checking database user is a
superuser
executing: SELECT rolsuper, oid FROM pg_catalog.pg_roles WHERE rolname =
current_user
executing: SELECT COUNT(*) FROM
pg_catalog.pg_roles
ok
Checking database connection
settings executing: SELECT datname, datallowconn FROM pg_catalog.pg_database
ok
Checking for prepared
transactions
executing: SELECT * FROM pg_catalog.pg_prepared_xacts
ok
Checking for reg* system OID user
data types executing:
SELECT n.nspname, c.relname, a.attname FROM
pg_catalog.pg_class c,
pg_catalog.pg_namespace n,
pg_catalog.pg_attribute a WHERE c.oid = a.attrelid AND NOT a.attisdropped AND a.atttypid IN (
'pg_catalog.regproc'::pg_catalog.regtype,
'pg_catalog.regprocedure'::pg_catalog.regtype,
'pg_catalog.regoper'::pg_catalog.regtype,
'pg_catalog.regoperator'::pg_catalog.regtype, 'pg_catalog.regconfig'::pg_catalog.regtype,
'pg_catalog.regdictionary'::pg_catalog.regtype) AND c.relnamespace = n.oid AND n.nspname NOT IN ('pg_catalog',
'information_schema')
executing: SELECT n.nspname,
c.relname, a.attname FROM
pg_catalog.pg_class c,
pg_catalog.pg_namespace n,
pg_catalog.pg_attribute a WHERE c.oid = a.attrelid AND NOT a.attisdropped AND a.atttypid IN ( 'pg_catalog.regproc'::pg_catalog.regtype,
'pg_catalog.regprocedure'::pg_catalog.regtype,
'pg_catalog.regoper'::pg_catalog.regtype,
'pg_catalog.regoperator'::pg_catalog.regtype, 'pg_catalog.regconfig'::pg_catalog.regtype,
'pg_catalog.regdictionary'::pg_catalog.regtype) AND c.relnamespace = n.oid AND n.nspname NOT IN ('pg_catalog',
'information_schema')
executing: SELECT n.nspname,
c.relname, a.attname FROM pg_catalog.pg_class
c, pg_catalog.pg_namespace
n, pg_catalog.pg_attribute a
WHERE c.oid = a.attrelid AND NOT
a.attisdropped AND a.atttypid IN
(
'pg_catalog.regproc'::pg_catalog.regtype, 'pg_catalog.regprocedure'::pg_catalog.regtype,
'pg_catalog.regoper'::pg_catalog.regtype, 'pg_catalog.regoperator'::pg_catalog.regtype,
'pg_catalog.regconfig'::pg_catalog.regtype, 'pg_catalog.regdictionary'::pg_catalog.regtype)
AND c.relnamespace = n.oid
AND n.nspname NOT IN
('pg_catalog', 'information_schema')
ok
Checking for contrib/isn with
bigint-passing mismatch ok
Checking for invalid "line"
user columns executing: SELECT n.nspname,
c.relname, a.attname FROM
pg_catalog.pg_class c,
pg_catalog.pg_namespace n,
pg_catalog.pg_attribute a WHERE c.oid = a.attrelid AND NOT a.attisdropped AND a.atttypid =
'pg_catalog.line'::pg_catalog.regtype AND c.relnamespace = n.oid AND n.nspname !~ '^pg_temp_' AND n.nspname !~ '^pg_toast_temp_'
AND n.nspname NOT IN
('pg_catalog', 'information_schema')
executing: SELECT n.nspname,
c.relname, a.attname FROM
pg_catalog.pg_class c,
pg_catalog.pg_namespace n,
pg_catalog.pg_attribute a WHERE c.oid = a.attrelid AND NOT a.attisdropped AND a.atttypid =
'pg_catalog.line'::pg_catalog.regtype AND c.relnamespace = n.oid AND n.nspname !~ '^pg_temp_' AND n.nspname !~ '^pg_toast_temp_' AND n.nspname NOT IN ('pg_catalog',
'information_schema')
executing: SELECT n.nspname,
c.relname, a.attname FROM pg_catalog.pg_class
c, pg_catalog.pg_namespace
n, pg_catalog.pg_attribute a
WHERE c.oid = a.attrelid AND NOT
a.attisdropped AND a.atttypid =
'pg_catalog.line'::pg_catalog.regtype AND c.relnamespace = n.oid AND n.nspname !~ '^pg_temp_' AND n.nspname !~ '^pg_toast_temp_'
AND n.nspname NOT IN
('pg_catalog', 'information_schema')
ok
Creating dump of global objects
"/usr/pgsql-9.4/bin/pg_dumpall" --host "/var/lib/pgsql/9.4/data"
--port 50432 --username "postgres" --globals-only
--quote-all-identifiers --binary-upgrade --verbose -f
pg_upgrade_dump_globals.sql >> "pg_upgrade_utility.log"
2>&1
ok
Creating dump of database schemas
"/usr/pgsql-9.4/bin/pg_dump"
--host "/var/lib/pgsql/9.4/data" --port 50432 --username
"postgres" --schema-only --quote-all-identifiers --binary-upgrade
--format=custom --verbose --file="pg_upgrade_dump_12780.custom"
"postgres" >> "pg_upgrade_dump_12780.log" 2>&1
"/usr/pgsql-9.4/bin/pg_dump"
--host "/var/lib/pgsql/9.4/data" --port 50432 --username
"postgres" --schema-only --quote-all-identifiers --binary-upgrade
--format=custom --verbose --file="pg_upgrade_dump_1.custom"
"template1" >> "pg_upgrade_dump_1.log" 2>&1
"/usr/pgsql-9.4/bin/pg_dump"
--host "/var/lib/pgsql/9.4/data" --port 50432 --username
"postgres" --schema-only --quote-all-identifiers --binary-upgrade
--format=custom --verbose --file="pg_upgrade_dump_16406.custom"
"testdb" >> "pg_upgrade_dump_16406.log" 2>&1
ok
"/usr/pgsql-9.1/bin/pg_ctl"
-w -D "/var/lib/pgsql/9.1/data/" -o "" stop >>
"pg_upgrade_server.log" 2>&1
"/usr/pgsql-9.4/bin/pg_ctl"
-w -l "pg_upgrade_server.log" -D "/var/lib/pgsql/9.4/data/"
-o "-p 50432 -b -c synchronous_commit=off -c fsync=off -c
full_page_writes=off -c
listen_addresses='' -c unix_socket_permissions=0700 -c
unix_socket_directories='/var/lib/pgsql/9.4/data'" start >>
"pg_upgrade_server.log" 2>&1
executing: SELECT datcollate,
datctype FROM pg_catalog.pg_database WHERE datname = 'template0'
executing: SELECT
pg_catalog.pg_encoding_to_char(encoding) FROM pg_catalog.pg_database WHERE datname = 'template0'
executing: SELECT d.oid, d.datname,
pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM
pg_catalog.pg_database d LEFT OUTER JOIN
pg_catalog.pg_tablespace t ON
d.dattablespace = t.oid WHERE d.datallowconn = true ORDER BY 2
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace
n ON c.relnamespace = n.oid LEFT
OUTER JOIN pg_catalog.pg_index i
ON c.oid = i.indexrelid WHERE relkind IN ('r', 'm', 'i', 'S') AND i.indisvalid IS DISTINCT FROM false AND i.indisready IS DISTINCT FROM false AND ((n.nspname !~ '^pg_temp_' AND n.nspname !~ '^pg_toast_temp_' AND n.nspname NOT IN ('pg_catalog',
'information_schema',
'binary_upgrade', 'pg_toast') AND c.oid >= 16384) OR (n.nspname = 'pg_catalog' AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata',
'pg_largeobject_metadata_oid_index') ));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND indrelid IN (SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode,
c.reltablespace, pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM
info_rels i JOIN pg_catalog.pg_class c
ON i.reloid = c.oid JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN
pg_catalog.pg_tablespace t ON
c.reltablespace = t.oid ORDER BY 1;
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = i.indexrelid WHERE relkind
IN ('r', 'm', 'i', 'S') AND i.indisvalid
IS DISTINCT FROM false AND i.indisready
IS DISTINCT FROM false AND ((n.nspname
!~ '^pg_temp_' AND n.nspname !~
'^pg_toast_temp_' AND n.nspname NOT
IN ('pg_catalog', 'information_schema', 'binary_upgrade',
'pg_toast') AND c.oid >=
16384) OR (n.nspname = 'pg_catalog'
AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata',
'pg_largeobject_metadata_oid_index') ));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND indrelid IN (SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode,
c.reltablespace, pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM
info_rels i JOIN pg_catalog.pg_class c
ON i.reloid = c.oid JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN
pg_catalog.pg_tablespace t ON
c.reltablespace = t.oid ORDER BY 1;
new databases:
Database: postgres
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname: pg_catalog.pg_largeobject_loid_pn_index:
reloid: 2683 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata: reloid: 2995 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata_oid_index: reloid: 2996 reltblspace:
Database: template1
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname:
pg_catalog.pg_largeobject_loid_pn_index: reloid: 2683 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata: reloid: 2995 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata_oid_index: reloid: 2996 reltblspace:
Checking for presence of required
libraries ok
Checking database user is a
superuser
executing: SELECT rolsuper, oid FROM pg_catalog.pg_roles WHERE rolname =
current_user
executing: SELECT COUNT(*) FROM
pg_catalog.pg_roles
ok
Checking for prepared
transactions
executing: SELECT * FROM pg_catalog.pg_prepared_xacts
ok
If pg_upgrade fails after this point,
you must re-initdb the
new cluster before continuing.
Performing Upgrade
------------------
Analyzing all rows in the new
cluster
"/usr/pgsql-9.4/bin/vacuumdb" --host
"/var/lib/pgsql/9.4/data" --port 50432 --username
"postgres" --all --analyze --verbose >>
"pg_upgrade_utility.log" 2>&1
ok
Freezing all rows on the new cluster
"/usr/pgsql-9.4/bin/vacuumdb" --host
"/var/lib/pgsql/9.4/data" --port 50432 --username
"postgres" --all --freeze --verbose >> "pg_upgrade_utility.log"
2>&1
ok
executing: SELECT c.relname,
c.relfilenode FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n WHERE
c.relnamespace = n.oid AND
n.nspname = 'pg_catalog' AND
c.relname = 'pg_database' ORDER BY c.relname
"/usr/pgsql-9.4/bin/pg_ctl"
-w -D "/var/lib/pgsql/9.4/data/" -o "" stop >> "pg_upgrade_server.log"
2>&1
Deleting files from new pg_clog ok
Copying old pg_clog to new
server cp -Rf
"/var/lib/pgsql/9.1/data/pg_clog"
"/var/lib/pgsql/9.4/data/pg_clog" >>
"pg_upgrade_utility.log" 2>&1
ok
Setting next transaction ID and epoch
for new cluster
"/usr/pgsql-9.4/bin/pg_resetxlog" -f -x 764
"/var/lib/pgsql/9.4/data" >> "pg_upgrade_utility.log"
2>&1
"/usr/pgsql-9.4/bin/pg_resetxlog"
-f -e 0 "/var/lib/pgsql/9.4/data" >>
"pg_upgrade_utility.log" 2>&1
ok
Deleting files from new
pg_multixact/offsets ok
Setting oldest multixact ID on new
cluster
"/usr/pgsql-9.4/bin/pg_resetxlog" -m 2,1
"/var/lib/pgsql/9.4/data" >> "pg_upgrade_utility.log"
2>&1
ok
Resetting WAL archives
"/usr/pgsql-9.4/bin/pg_resetxlog" -l 000000010000000000000025
"/var/lib/pgsql/9.4/data" >> "pg_upgrade_utility.log"
2>&1
ok
"/usr/pgsql-9.4/bin/pg_ctl"
-w -l "pg_upgrade_server.log" -D "/var/lib/pgsql/9.4/data/"
-o "-p 50432 -b -c synchronous_commit=off -c fsync=off -c
full_page_writes=off -c
listen_addresses='' -c unix_socket_permissions=0700 -c
unix_socket_directories='/var/lib/pgsql/9.4/data'" start >>
"pg_upgrade_server.log" 2>&1
Setting frozenxid and minmxid counters
in new cluster executing: UPDATE
pg_catalog.pg_database SET
datfrozenxid = '764'
executing: UPDATE
pg_catalog.pg_database SET datminmxid
= '1'
executing: SELECT datname, datallowconn FROM pg_catalog.pg_database
executing: UPDATE pg_catalog.pg_class SET relfrozenxid =
'764' WHERE relkind IN ('r', 'm',
't')
executing: UPDATE pg_catalog.pg_class SET relminmxid = '1'
WHERE relkind IN ('r', 'm', 't')
executing: UPDATE
pg_catalog.pg_database SET
datallowconn = true WHERE datname = 'template0'
executing: UPDATE pg_catalog.pg_class SET relfrozenxid =
'764' WHERE relkind IN ('r', 'm',
't')
executing: UPDATE pg_catalog.pg_class SET relminmxid = '1'
WHERE relkind IN ('r', 'm', 't')
executing: UPDATE pg_catalog.pg_database
SET datallowconn = false WHERE datname
= 'template0'
executing: UPDATE pg_catalog.pg_class SET relfrozenxid =
'764' WHERE relkind IN ('r', 'm',
't')
executing: UPDATE pg_catalog.pg_class SET relminmxid = '1'
WHERE relkind IN ('r', 'm', 't')
ok
Restoring global objects in the new
cluster executing: SET
client_min_messages = warning;
executing: DROP SCHEMA IF EXISTS
binary_upgrade CASCADE;
executing: RESET client_min_messages;
executing: CREATE SCHEMA
binary_upgrade;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_pg_type_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_array_pg_type_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_toast_pg_type_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_heap_pg_class_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_index_pg_class_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_toast_pg_class_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_pg_enum_oid(OID) RETURNS VOID AS '$libdir/pg_upgrade_support'
LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_pg_authid_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.create_empty_extension(text, text, bool, text, oid[], text[],
text[]) RETURNS VOID AS '$libdir/pg_upgrade_support' LANGUAGE C;
"/usr/pgsql-9.4/bin/psql"
--echo-queries --set ON_ERROR_STOP=on --no-psqlrc --dbname=template1 --host
"/var/lib/pgsql/9.4/data" --port 50432 --username "postgres"
-f "pg_upgrade_dump_globals.sql" >>
"pg_upgrade_utility.log" 2>&1
ok
executing: SELECT d.oid, d.datname,
pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM
pg_catalog.pg_database d LEFT OUTER JOIN
pg_catalog.pg_tablespace t ON d.dattablespace
= t.oid WHERE d.datallowconn = true ORDER BY 2
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = i.indexrelid WHERE relkind
IN ('r', 'm', 'i', 'S') AND i.indisvalid
IS DISTINCT FROM false AND i.indisready
IS DISTINCT FROM false AND ((n.nspname
!~ '^pg_temp_' AND n.nspname !~
'^pg_toast_temp_' AND n.nspname NOT
IN ('pg_catalog', 'information_schema', 'binary_upgrade',
'pg_toast') AND c.oid >=
16384) OR (n.nspname = 'pg_catalog' AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata',
'pg_largeobject_metadata_oid_index') ));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND indrelid IN (SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode, c.reltablespace,
pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM info_rels i JOIN
pg_catalog.pg_class c ON
i.reloid = c.oid JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN
pg_catalog.pg_tablespace t ON c.reltablespace = t.oid ORDER BY 1;
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = i.indexrelid WHERE relkind
IN ('r', 'm', 'i', 'S') AND i.indisvalid
IS DISTINCT FROM false AND i.indisready
IS DISTINCT FROM false AND ((n.nspname
!~ '^pg_temp_' AND n.nspname !~
'^pg_toast_temp_' AND n.nspname NOT
IN ('pg_catalog', 'information_schema', 'binary_upgrade',
'pg_toast') AND c.oid >=
16384) OR (n.nspname = 'pg_catalog' AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata',
'pg_largeobject_metadata_oid_index') ));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND
indrelid IN (SELECT reltoastrelid
FROM info_rels i JOIN
pg_catalog.pg_class c ON
i.reloid = c.oid AND
c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode,
c.reltablespace, pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM
info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid JOIN pg_catalog.pg_namespace n ON c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_tablespace
t ON c.reltablespace = t.oid
ORDER BY 1;
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = i.indexrelid WHERE relkind
IN ('r', 'm', 'i', 'S') AND i.indisvalid
IS DISTINCT FROM false AND i.indisready
IS DISTINCT FROM false AND ((n.nspname
!~ '^pg_temp_' AND n.nspname !~
'^pg_toast_temp_' AND n.nspname NOT
IN ('pg_catalog', 'information_schema', 'binary_upgrade',
'pg_toast') AND c.oid >=
16384) OR (n.nspname = 'pg_catalog' AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata',
'pg_largeobject_metadata_oid_index') ));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND indrelid IN (SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode,
c.reltablespace, pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM
info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid JOIN pg_catalog.pg_namespace n ON c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_tablespace
t ON c.reltablespace = t.oid
ORDER BY 1;
new databases:
Database: postgres
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname:
pg_catalog.pg_largeobject_loid_pn_index: reloid: 2683 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata: reloid: 2995 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata_oid_index: reloid: 2996 reltblspace:
Database: template1
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname:
pg_catalog.pg_largeobject_loid_pn_index: reloid: 2683 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata: reloid: 2995 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata_oid_index: reloid: 2996 reltblspace:
Database: testdb
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname: pg_catalog.pg_largeobject_loid_pn_index:
reloid: 2683 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata: reloid: 2995 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata_oid_index: reloid: 2996 reltblspace:
Adding support functions to new
cluster executing: SET client_min_messages =
warning;
executing: DROP SCHEMA IF EXISTS
binary_upgrade CASCADE;
executing: RESET client_min_messages;
executing: CREATE SCHEMA
binary_upgrade;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_pg_type_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_array_pg_type_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_toast_pg_type_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_heap_pg_class_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_index_pg_class_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_toast_pg_class_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_pg_enum_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_pg_authid_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.create_empty_extension(text, text, bool, text, oid[], text[],
text[]) RETURNS VOID AS '$libdir/pg_upgrade_support' LANGUAGE C;
executing: SET client_min_messages =
warning;
executing: DROP SCHEMA IF EXISTS
binary_upgrade CASCADE;
executing: RESET client_min_messages;
executing: CREATE SCHEMA
binary_upgrade;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_pg_type_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_array_pg_type_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_toast_pg_type_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_heap_pg_class_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_index_pg_class_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_toast_pg_class_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_pg_enum_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.set_next_pg_authid_oid(OID) RETURNS VOID AS
'$libdir/pg_upgrade_support' LANGUAGE C STRICT;
executing: CREATE OR REPLACE FUNCTION
binary_upgrade.create_empty_extension(text, text, bool, text, oid[], text[],
text[]) RETURNS VOID AS '$libdir/pg_upgrade_support' LANGUAGE C;
ok
Restoring database schemas in the new
cluster
"/usr/pgsql-9.4/bin/pg_restore"
--host "/var/lib/pgsql/9.4/data" --port 50432 --username
"postgres" --exit-on-error --verbose --dbname "postgres"
"pg_upgrade_dump_12780.custom" >> "pg_upgrade_dump_12780.log"
2>&1
"/usr/pgsql-9.4/bin/pg_restore"
--host "/var/lib/pgsql/9.4/data" --port 50432 --username
"postgres" --exit-on-error --verbose --dbname "template1"
"pg_upgrade_dump_1.custom" >> "pg_upgrade_dump_1.log"
2>&1
"/usr/pgsql-9.4/bin/pg_restore"
--host "/var/lib/pgsql/9.4/data" --port 50432 --username
"postgres" --exit-on-error --verbose --dbname "testdb"
"pg_upgrade_dump_16406.custom" >>
"pg_upgrade_dump_16406.log" 2>&1
ok
Setting minmxid counter in new
cluster executing:
UPDATE pg_catalog.pg_database SET
datminmxid = '1'
executing: SELECT datname, datallowconn FROM pg_catalog.pg_database
executing: UPDATE
pg_catalog.pg_database SET datallowconn
= true WHERE datname = 'template0'
executing: UPDATE pg_catalog.pg_class SET relminmxid = '1'
WHERE relkind IN ('r', 'm', 't')
executing: UPDATE
pg_catalog.pg_database SET
datallowconn = false WHERE datname = 'template0'
executing: UPDATE pg_catalog.pg_class SET relminmxid = '1'
WHERE relkind IN ('r', 'm', 't')
executing: UPDATE pg_catalog.pg_class SET relminmxid = '1'
WHERE relkind IN ('r', 'm', 't')
executing: UPDATE pg_catalog.pg_class SET relminmxid = '1'
WHERE relkind IN ('r', 'm', 't')
ok
Creating newly-required TOAST
tables executing:
SELECT n.nspname, c.relname FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n
WHEREc.relnamespace = n.oid AND
n.nspname NOT IN ('pg_catalog', 'information_schema') AND c.relkind IN
('r', 'm') AND c.reltoastrelid = 0
executing: SELECT n.nspname,
c.relname FROM pg_catalog.pg_class
c, pg_catalog.pg_namespace n
WHERE c.relnamespace = n.oid AND
n.nspname NOT IN ('pg_catalog', 'information_schema') AND c.relkind IN
('r', 'm') AND c.reltoastrelid = 0
executing: SELECT n.nspname,
c.relname FROM pg_catalog.pg_class
c, pg_catalog.pg_namespace n
WHERE c.relnamespace = n.oid AND
n.nspname NOT IN ('pg_catalog', 'information_schema') AND c.relkind IN
('r', 'm') AND c.reltoastrelid = 0
executing: SELECT
binary_upgrade.set_next_toast_pg_class_oid('10'::pg_catalog.oid);
executing: ALTER TABLE
"public"."department" RESET (binary_upgrade_dummy_option);
ok
executing: SELECT d.oid, d.datname,
pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM
pg_catalog.pg_database d LEFT OUTER JOIN
pg_catalog.pg_tablespace t ON d.dattablespace
= t.oid WHERE d.datallowconn = true ORDER BY 2
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = i.indexrelid WHERE relkind
IN ('r', 'm', 'i', 'S') AND i.indisvalid
IS DISTINCT FROM false AND i.indisready
IS DISTINCT FROM false AND ((n.nspname
!~ '^pg_temp_' AND n.nspname !~
'^pg_toast_temp_' AND n.nspname NOT
IN ('pg_catalog', 'information_schema', 'binary_upgrade',
'pg_toast') AND c.oid >=
16384) OR (n.nspname = 'pg_catalog'
AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata',
'pg_largeobject_metadata_oid_index') ));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND indrelid IN (SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode,
c.reltablespace, pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM
info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid JOIN pg_catalog.pg_namespace n ON c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_tablespace
t ON c.reltablespace = t.oid
ORDER BY 1;
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = i.indexrelid WHERE relkind
IN ('r', 'm', 'i', 'S') AND i.indisvalid
IS DISTINCT FROM false AND i.indisready
IS DISTINCT FROM false AND ((n.nspname
!~ '^pg_temp_' AND n.nspname !~
'^pg_toast_temp_' AND n.nspname NOT
IN ('pg_catalog', 'information_schema', 'binary_upgrade',
'pg_toast') AND c.oid >= 16384) OR (n.nspname = 'pg_catalog' AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata',
'pg_largeobject_metadata_oid_index') ));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND indrelid IN (SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode,
c.reltablespace, pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM
info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid JOIN pg_catalog.pg_namespace n ON c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_tablespace
t ON c.reltablespace = t.oid
ORDER BY 1;
executing: CREATE TEMPORARY TABLE
info_rels (reloid) AS SELECT c.oid FROM pg_catalog.pg_class c JOIN
pg_catalog.pg_namespace n ON
c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_index i ON c.oid = i.indexrelid WHERE relkind
IN ('r', 'm', 'i', 'S') AND i.indisvalid
IS DISTINCT FROM false AND i.indisready
IS DISTINCT FROM false AND ((n.nspname
!~ '^pg_temp_' AND n.nspname !~
'^pg_toast_temp_' AND n.nspname NOT
IN ('pg_catalog', 'information_schema', 'binary_upgrade',
'pg_toast') AND c.oid >=
16384) OR (n.nspname = 'pg_catalog'
AND relname IN ('pg_largeobject',
'pg_largeobject_loid_pn_index', 'pg_largeobject_metadata',
'pg_largeobject_metadata_oid_index') ));
executing: INSERT INTO info_rels
SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0
executing: INSERT INTO info_rels
SELECT indexrelid FROM pg_index WHERE indisvalid AND indrelid IN (SELECT reltoastrelid FROM info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid AND c.reltoastrelid != 0)
executing: SELECT c.oid, n.nspname,
c.relname, c.relfilenode,
c.reltablespace, pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM
info_rels i JOIN pg_catalog.pg_class c ON i.reloid = c.oid JOIN pg_catalog.pg_namespace n ON c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_tablespace
t ON c.reltablespace = t.oid
ORDER BY 1;
new databases:
Database: postgres
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname:
pg_catalog.pg_largeobject_loid_pn_index: reloid: 2683 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata: reloid: 2995 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata_oid_index: reloid: 2996 reltblspace:
Database: template1
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname:
pg_catalog.pg_largeobject_loid_pn_index: reloid: 2683 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata: reloid: 2995 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata_oid_index: reloid: 2996 reltblspace:
Database: testdb
relname: pg_catalog.pg_largeobject:
reloid: 2613 reltblspace:
relname:
pg_catalog.pg_largeobject_loid_pn_index: reloid: 2683 reltblspace:
relname: pg_catalog.pg_largeobject_metadata:
reloid: 2995 reltblspace:
relname:
pg_catalog.pg_largeobject_metadata_oid_index: reloid: 2996 reltblspace:
relname: public.department: reloid:
16393 reltblspace:
relname: public.department_pkey:
reloid: 16396 reltblspace:
relname: public.company: reloid:
16398 reltblspace:
relname: pg_toast.pg_toast_16398:
reloid: 16401 reltblspace:
relname:
pg_toast.pg_toast_16398_index: reloid: 16403 reltblspace:
relname: public.company_pkey: reloid:
16404 reltblspace:
relname: public.n_company: reloid:
16412 reltblspace:
relname: pg_toast.pg_toast_16412:
reloid: 16415 reltblspace:
relname:
pg_toast.pg_toast_16412_index: reloid: 16417 reltblspace:
relname: public.manoj_company:
reloid: 24601 reltblspace:
relname: pg_toast.pg_toast_24601:
reloid: 24604 reltblspace:
relname:
pg_toast.pg_toast_24601_index: reloid: 24606 reltblspace:
relname: public.man: reloid: 24607
reltblspace:
relname: pg_toast.pg_toast_24607:
reloid: 24610 reltblspace:
relname:
pg_toast.pg_toast_24607_index: reloid: 24612 reltblspace:
Removing support functions from new
cluster executing: SET
client_min_messages = warning;
executing: DROP SCHEMA binary_upgrade
CASCADE;
executing: RESET client_min_messages;
executing: SET client_min_messages =
warning;
executing: DROP SCHEMA binary_upgrade
CASCADE;
executing: RESET client_min_messages;
executing: SET client_min_messages =
warning;
executing: DROP SCHEMA binary_upgrade
CASCADE;
executing: RESET client_min_messages;
ok
"/usr/pgsql-9.4/bin/pg_ctl"
-w -D "/var/lib/pgsql/9.4/data/" -o "" stop >>
"pg_upgrade_server.log" 2>&1
Adding ".old" suffix to old
global/pg_control ok
If you want to start the old cluster,
you will need to remove
the ".old" suffix from
/var/lib/pgsql/9.1/data/global/pg_control.old.
Because "link" mode was
used, the old cluster cannot be safely
started once the new cluster has been
started.
Linking user relation files
mappings for database
"postgres":
pg_catalog.pg_largeobject: 12652 to
12960
pg_catalog.pg_largeobject_loid_pn_index:
12654 to 12962
pg_catalog.pg_largeobject_metadata:
12603 to 12822
pg_catalog.pg_largeobject_metadata_oid_index:
12605 to 12824
linking
"/var/lib/pgsql/9.1/data/base/12780/12652" to
"/var/lib/pgsql/9.4/data/base/13003/12960"
linking
"/var/lib/pgsql/9.1/data/base/12780/12654" to
"/var/lib/pgsql/9.4/data/base/13003/12962"
linking
"/var/lib/pgsql/9.1/data/base/12780/12603" to
"/var/lib/pgsql/9.4/data/base/13003/12822"
linking
"/var/lib/pgsql/9.1/data/base/12780/12605" to
"/var/lib/pgsql/9.4/data/base/13003/12824"
mappings for database
"template1":
pg_catalog.pg_largeobject: 12652 to
12960
pg_catalog.pg_largeobject_loid_pn_index:
12654 to 12962
pg_catalog.pg_largeobject_metadata:
12603 to 12822
pg_catalog.pg_largeobject_metadata_oid_index:
12605 to 12824
linking "/var/lib/pgsql/9.1/data/base/1/12652"
to "/var/lib/pgsql/9.4/data/base/1/12960"
linking
"/var/lib/pgsql/9.1/data/base/1/12654" to
"/var/lib/pgsql/9.4/data/base/1/12962"
linking
"/var/lib/pgsql/9.1/data/base/1/12603" to
"/var/lib/pgsql/9.4/data/base/1/12822"
linking
"/var/lib/pgsql/9.1/data/base/1/12605" to
"/var/lib/pgsql/9.4/data/base/1/12824"
mappings for database
"testdb":
pg_catalog.pg_largeobject: 12652 to
12960
pg_catalog.pg_largeobject_loid_pn_index:
12654 to 12962
pg_catalog.pg_largeobject_metadata:
12603 to 12822
pg_catalog.pg_largeobject_metadata_oid_index:
12605 to 12824
public.department: 16393 to 16393
public.department_pkey: 16396 to
16396
public.company: 16398 to 16398
pg_toast.pg_toast_16398: 16401 to
16401
pg_toast.pg_toast_16398_index: 16403
to 16403
public.company_pkey: 16404 to 16404
public.n_company: 16412 to 16412
pg_toast.pg_toast_16412: 16415 to
16415
pg_toast.pg_toast_16412_index: 16417
to 16417
public.manoj_company: 24601 to 24601
pg_toast.pg_toast_24601: 24604 to
24604
pg_toast.pg_toast_24601_index: 24606
to 24606
public.man: 24607 to 24607
pg_toast.pg_toast_24607: 24610 to
24610
pg_toast.pg_toast_24607_index: 24612
to 24612
linking
"/var/lib/pgsql/9.1/data/base/16406/12652" to
"/var/lib/pgsql/9.4/data/base/16420/12960"
linking "/var/lib/pgsql/9.1/data/base/16406/12654"
to "/var/lib/pgsql/9.4/data/base/16420/12962"
linking
"/var/lib/pgsql/9.1/data/base/16406/12603" to
"/var/lib/pgsql/9.4/data/base/16420/12822"
linking
"/var/lib/pgsql/9.1/data/base/16406/12605" to
"/var/lib/pgsql/9.4/data/base/16420/12824"
linking
"/var/lib/pgsql/9.1/data/base/16406/16393" to
"/var/lib/pgsql/9.4/data/base/16420/16393"
linking
"/var/lib/pgsql/9.1/data/base/16406/16396" to
"/var/lib/pgsql/9.4/data/base/16420/16396"
linking
"/var/lib/pgsql/9.1/data/base/16406/16398" to
"/var/lib/pgsql/9.4/data/base/16420/16398"
linking
"/var/lib/pgsql/9.1/data/base/16406/16401" to
"/var/lib/pgsql/9.4/data/base/16420/16401"
linking
"/var/lib/pgsql/9.1/data/base/16406/16403" to
"/var/lib/pgsql/9.4/data/base/16420/16403"
linking
"/var/lib/pgsql/9.1/data/base/16406/16404" to
"/var/lib/pgsql/9.4/data/base/16420/16404"
linking
"/var/lib/pgsql/9.1/data/base/16406/16412" to
"/var/lib/pgsql/9.4/data/base/16420/16412"
linking
"/var/lib/pgsql/9.1/data/base/16406/16415" to "/var/lib/pgsql/9.4/data/base/16420/16415"
linking
"/var/lib/pgsql/9.1/data/base/16406/16417" to
"/var/lib/pgsql/9.4/data/base/16420/16417"
linking
"/var/lib/pgsql/9.1/data/base/16406/24601" to
"/var/lib/pgsql/9.4/data/base/16420/24601"
linking
"/var/lib/pgsql/9.1/data/base/16406/24604" to
"/var/lib/pgsql/9.4/data/base/16420/24604"
linking
"/var/lib/pgsql/9.1/data/base/16406/24606" to
"/var/lib/pgsql/9.4/data/base/16420/24606"
linking
"/var/lib/pgsql/9.1/data/base/16406/24607" to
"/var/lib/pgsql/9.4/data/base/16420/24607"
linking
"/var/lib/pgsql/9.1/data/base/16406/24610" to
"/var/lib/pgsql/9.4/data/base/16420/24610"
linking
"/var/lib/pgsql/9.1/data/base/16406/24612" to
"/var/lib/pgsql/9.4/data/base/16420/24612"
ok
Setting next OID for new cluster
"/usr/pgsql-9.4/bin/pg_resetxlog" -o 24624
"/var/lib/pgsql/9.4/data" >> "pg_upgrade_utility.log"
2>&1
ok
Sync data directory to disk
"/usr/pgsql-9.4/bin/initdb" --sync-only
"/var/lib/pgsql/9.4/data" >> "pg_upgrade_utility.log"
2>&1
ok
Creating script to analyze new
cluster ok
Creating script to delete old
cluster ok
Upgrade Complete
----------------
Optimizer statistics are not
transferred by pg_upgrade so,
once you start the new server,
consider running:
analyze_new_cluster.sh
Running this script will delete the
old cluster's data files:
delete_old_cluster.sh
6
- Config Network Access & Startup
the new Postgresql Instance
vi
/var/lib/pgsql/9.4/data/postgresql.conf
1. listen_addresses =
'*'
2. port = 5432
vi
/var/lib/pgsql/9.4/data/pg_hba.conf
-bash-4.1$ /usr/pgsql-9.4/bin/pg_ctl -D
/var/lib/pgsql/9.4/data -l logfile start
7
- Remove PG9.1 and & create softlink
with PG 9.4
[root@test_db01 9.4]# rpm -qa
postgresql91*
[root@test_db01 9.4]# yum remove
postgresql91*
[root@test_db01 9.4]# ln -s
/usr/pgsql-9.4/bin/psql /usr/bin/psql
[root@test_db01 bin]# ln -s
/usr/pgsql-9.4/bin/pg_standby /usr/bin/pg_standby
[root@test_db01 bin]# which
pg_standby
/usr/bin/pg_standby
[root@test_db01 9.4]# su - postgres
-bash-4.1$ psql
psql (9.4.4)
Type "help" for help.
postgres=# \q
8
- Optimizer statistics are not transferred by pg_upgrade so, once you start the
new server, consider running:
/var/lib/pgsql/9.4/data/analyze_new_cluster.sh
Running
this script will delete the old cluster's data files:
/var/lib/pgsql/9.4/data/delete_old_cluster.sh
*****************Now
9.1 to 9.4 upgrade complete**********************************
No comments:
Post a Comment