Closed adacaccia closed 3 years ago
I would guess that --check
doesn't start the temporary servers that just pg_upgrade
does when actually doing the upgrade, so it likely doesn't work in a container (but maybe PGHOST
to your running container would make it work).
pls How to solve this problem.
9.6 to 12
connection to database failed: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/lib/postgresql/.s.PGSQL.50432"?
Solution:
cat pg_upgrade_server.log
LOG: invalid value for parameter "lc_monetary": "zh_CN.UTF-8"
update lc_monetary": "zh_CN.UTF-8" to lc_monetary": "en.US.UTF-8"
@jicki
I also met the same question, but the reason is that I didn't specify the env PGDATAOLD
which is different from the default value.
Besides, I'd like to know how to check the pg_upgrade_server.log
after the pg_upgrade container exit?
I'd like to know how to check the
pg_upgrade_server.log
after the pg_upgrade container exit?
You could, for example, put it into a host volume.
Directory structure under /mnt/ocfs2/timescaledb:
find /mnt/ocfs2/timescaledb/ -mindepth 2 -maxdepth 2
/mnt/ocfs2/timescaledb/10/data
/mnt/ocfs2/timescaledb/12/data
Command run:
docker run --rm -v /mnt/ocfs2/timescaledb:/var/lib/postgresql tianon/postgres-upgrade:10-to-12 --check -O "-c timescaledb.restoring='on'"
Results in following output:
It is just impossible to get to a Unix socket in another running container! Moreover, the 10-to-12 image downloads and installs the 10 version package, so in theory could run it locally; this would lead to: