Replies: 1 comment
-
Sorry, I cannot reproduce: $ docker pull postgres:9.6
9.6: Pulling from library/postgres
Digest: sha256:1875e64af18d4cd8fb262d18f1e7e95dc70719a8b3dc0635a9312f40cefbea4d
Status: Image is up to date for postgres:9.6
$ docker pull postgres:10
10: Pulling from library/postgres
Digest: sha256:3f4441460029e12905a5d447a3549ae2ac13323d045391b0cb0cf8b48ea17463
Status: Image is up to date for postgres:10
$ docker pull tianon/postgres-upgrade:9.6-to-10
9.6-to-10: Pulling from tianon/postgres-upgrade
Digest: sha256:043ee331d70ac176cfe2523895fa3388576a9202ccba3ae23a63c96e183418f7
Status: Downloaded newer image for tianon/postgres-upgrade:9.6-to-10
$ docker run --name postgres -dit -v "$PWD/data-9.6":/var/lib/postgresql/data postgres:9.6
12f4e4e61e700603599fe7397f4201a303dc1c81c75e74b3c48e3d3e5683e15d
$ docker logs --tail=4 postgres
LOG: database system was shut down at 2018-01-16 21:51:45 UTC
LOG: MultiXact member wraparound protections are now enabled
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
$ docker run -it --rm -v "$PWD/data-9.6":/var/lib/postgresql/9.6/data -v "$PWD/data-10":/var/lib/postgresql/10/data tianon/postgres-upgrade:9.6-to-10
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.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/10/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
pg_ctl -D /var/lib/postgresql/10/data -l logfile start
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is the install user ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for reg* data types in user tables ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking for invalid "unknown" user columns ok
Creating dump of global objects ok
Creating dump of database schemas
ok
Checking for presence of required libraries ok
Checking database user is the install user ok
Checking for prepared transactions 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 ok
Freezing all rows in the new cluster ok
Deleting files from new pg_xact ok
Copying old pg_clog to new server ok
Setting next transaction ID and epoch for new cluster ok
Deleting files from new pg_multixact/offsets ok
Copying old pg_multixact/offsets to new server ok
Deleting files from new pg_multixact/members ok
Copying old pg_multixact/members to new server ok
Setting next multixact ID and offset for new cluster ok
Resetting WAL archives ok
Setting frozenxid and minmxid counters in new cluster ok
Restoring global objects in the new cluster ok
Restoring database schemas in the new cluster
ok
Copying user relation files
ok
Setting next OID for new cluster ok
Sync data directory to disk ok
Creating script to analyze new cluster ok
Creating script to delete old cluster ok
Checking for hash indexes 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
$ docker run --name postgres -dit -v "$PWD/data-10":/var/lib/postgresql/data postgres:10
ea5cc6e56e582a7bcda9340cbf36187c32a4e2340ed9fbc09b2d866940afc543
$ docker logs postgres
2018-01-16 21:54:13.230 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2018-01-16 21:54:13.230 UTC [1] LOG: listening on IPv6 address "::", port 5432
2018-01-16 21:54:13.232 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2018-01-16 21:54:13.240 UTC [24] LOG: database system was shut down at 2018-01-16 21:53:46 UTC
2018-01-16 21:54:13.243 UTC [1] LOG: database system is ready to accept connections (note that those final logs include no initialization because the database is already initialized) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
postgres_1 | check for "/usr/lib/postgresql/9.6/bin" failed: No such file or directory
postgres_1 |
postgres_1 | Failure, exiting
Beta Was this translation helpful? Give feedback.
All reactions