PostgreSQL 10 => 11.1 pg_upgrade Postmaster, использующий старый кластер - PullRequest
0 голосов
/ 30 декабря 2018

Кажется, я застрял между двумя операциями, обе pg_upgrade для переключения на PostgreSQL мажорную версию и pg_ctl для управления текущим контролем postmaster над old cluster.

[Sun Dec 30 09:29 rich@HQ /usr/local/var] /usr/local/Cellar/postgresql@10/10.6/bin/pg_upgrade -v \
>     -b /usr/local/Cellar/postgresql@10/10.6/bin \
>     -B /usr/local/Cellar/postgresql/11.1/bin \
>     -d /usr/local/var/postgres.old \
>     -D /usr/local/var/postgres
Running in verbose mode
"/usr/local/Cellar/postgresql@10/10.6/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/usr/local/var/postgres.old" -o "-p 50432 -c autovacuum=off -c autovacuum_freeze_max_age=2000000000  -c listen_addresses='' -c unix_socket_permissions=0700" start >> "pg_upgrade_server.log" 2>&1

There seems to be a postmaster servicing the old cluster.
Please shutdown that postmaster and try again.
Failure, exiting

Я пытался переименовать /usr/local/var/postgres/postgresql.pid, и это ничего не решало.Документы говорят, что я могу использовать pg_ctl, чтобы закрыть почтмейстер, но это не работает:

[Sun Dec 30 09:44 rich@HQ ~] pg_ctl --pgdata=/usr/local/var/postgres start -m fast
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start....2018-12-30 09:44:33.541 EST [12042] FATAL:  database files are incompatible with server
2018-12-30 09:44:33.541 EST [12042] DETAIL:  The data directory was initialized by PostgreSQL version 10, which is not compatible with this version 11.1.
 stopped waiting
pg_ctl: could not start server
Examine the log output.

Так что я не могу обновить версию без выключения почтмейстера, а выключение почтмейстера требуетинициализация новой версии.Я пойманЛюбое понимание ценится, как я могу заставить работать 11.1.

ОБНОВЛЕНИЕ

После обновления старой версии в журнале обновлений сказано следующее:

-----------------------------------------------------------------
    pg_upgrade run on Tue Jan  1 21:22:45 2019
-----------------------------------------------------------------

command: "/usr/local/Cellar/postgresql@10/10.6/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/usr/local/var/postgres.old" -o "-p 50432 -c autovacuum=off -c autovacuum_freeze_max_age=2000000000  -c listen_addresses='' -c unix_socket_permissions=0700" start >> "pg_upgrade_server.log" 2>&1
pg_ctl: another server might be running; trying to start server anyway
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
    Referenced from: /usr/local/Cellar/postgresql@10/10.6/bin/postgres
    Reason: image not found
no data was returned by command ""/usr/local/Cellar/postgresql@10/10.6/bin/postgres" -V"
The program "postgres" is needed by pg_ctl but was not found in the
same directory as "/usr/local/Cellar/postgresql@10/10.6/bin/pg_ctl".
Check your installation.


[Tue Jan 01 21:23 rich@HQ /usr/local/Cellar/postgresql@10/10.6/bin] ll
total 18960
drwxr-xr-x  38 rich  admin   1.3K Dec 28 17:01 .
drwxr-xr-x  14 rich  admin   476B Dec 28 16:56 ..
-r-xr-xr-x   1 rich  admin    51K Nov 16 04:56 clusterdb
-r-xr-xr-x   1 rich  admin    55K Nov 16 04:56 createdb
-r-xr-xr-x   1 rich  admin    59K Nov 16 04:56 createuser
-r-xr-xr-x   1 rich  admin    51K Nov 16 04:56 dropdb
-r-xr-xr-x   1 rich  admin    51K Nov 16 04:56 dropuser
-r-xr-xr-x   1 rich  admin   789K Nov 16 04:56 ecpg
-r-xr-xr-x   1 rich  admin   113K Nov 16 04:56 initdb
-r-xr-xr-x   1 rich  admin    30K Nov 16 04:56 oid2name
-r-xr-xr-x   1 rich  admin    26K Nov 16 04:56 pg_archivecleanup
-r-xr-xr-x   1 rich  admin   102K Nov 16 04:56 pg_basebackup
-r-xr-xr-x   1 rich  admin    30K Nov 16 04:56 pg_config
-r-xr-xr-x   1 rich  admin    38K Nov 16 04:56 pg_controldata
-r-xr-xr-x   1 rich  admin    52K Nov 16 04:56 pg_ctl
-r-xr-xr-x   1 rich  admin   351K Nov 16 04:56 pg_dump
-r-xr-xr-x   1 rich  admin    92K Nov 16 04:56 pg_dumpall
-r-xr-xr-x   1 rich  admin    51K Nov 16 04:56 pg_isready
-r-xr-xr-x   1 rich  admin    65K Nov 16 04:56 pg_receivewal
-r-xr-xr-x   1 rich  admin    70K Nov 16 04:56 pg_recvlogical
-r-xr-xr-x   1 rich  admin    47K Nov 16 04:56 pg_resetwal
-r-xr-xr-x   1 rich  admin   148K Nov 16 04:56 pg_restore
-r-xr-xr-x   1 rich  admin    78K Nov 16 04:56 pg_rewind
-r-xr-xr-x   1 rich  admin    26K Nov 16 04:56 pg_standby
-r-xr-xr-x   1 rich  admin    31K Nov 16 04:56 pg_test_fsync
-r-xr-xr-x   1 rich  admin    26K Nov 16 04:56 pg_test_timing
-r-xr-xr-x   1 rich  admin   120K Nov 16 04:56 pg_upgrade
-rw-------   1 rich  admin   796B Dec 28 17:04 pg_upgrade_internal.log
-rw-------   1 rich  admin   358B Dec 28 17:04 pg_upgrade_server.log
-rw-------   1 rich  admin   358B Dec 28 17:04 pg_upgrade_utility.log
-r-xr-xr-x   1 rich  admin    76K Nov 16 04:56 pg_waldump
-r-xr-xr-x   1 rich  admin   122K Nov 16 04:56 pgbench
-r-xr-xr-x   1 rich  admin   5.8M Nov 16 04:55 postgres
lrwxr-xr-x   1 rich  admin     8B Nov 16 04:55 postmaster -> postgres
-r-xr-xr-x   1 rich  admin   544K Nov 16 04:56 psql
-r-xr-xr-x   1 rich  admin    59K Nov 16 04:56 reindexdb
-r-xr-xr-x   1 rich  admin    64K Nov 16 04:56 vacuumdb
-r-xr-xr-x   1 rich  admin    30K Nov 16 04:56 vacuumlo
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...