Comments (1)
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)
from docker-postgres-upgrade.
Related Issues (20)
- Support custom installed username HOT 1
- Upgrading from 14 to 15 failing with `"/var/lib/postgresql/14/data/PG_VERSION": No such file or directory` HOT 5
- Docker image should run pg_upgrade's generated update_extension.sql file when present HOT 2
- support custom username for example "-U my_username" when connecting HOT 6
- Break database made with Alpine-based container HOT 6
- PostgreSQL 16 HOT 3
- TO VERSION 16 HOT 1
- 11 to VERSION 16 REQUEST HOT 1
- Cannot create directory: File exists. HOT 1
- Docker image for ARM64 (aarch64 / Arm Ampere) architecture HOT 1
- "could not create any Unix-domain sockets" HOT 2
- Add ARM Arch Support HOT 1
- Does the operation of `exec gosu postgres "$BASH_SOURCE" "$@"` overlap with `exec "$@"`? HOT 4
- 13-to-15: FATAL: role "postgres" does not exist HOT 2
- How to support PostgreSQL database upgrade with multiple tablespaces HOT 1
- Collation warning
- script to review when username is not postgres - permission issue
- Is there a reason to remove upgrade ability for older versions? HOT 2
- chown fails
- Support for linux/arm64/v8 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-postgres-upgrade.