postgresql – 在Windows上pg_upl期间从9.0到9.1执行pg_ctl的问题

我正在尝试在Windows Server 2003上将我的9.0 PSQL升级到9.1.我已经安装了9.1,停止了这两项服务,并且通常遵循this guide的所有步骤.但是,当我实际运行命令时,我得到了这个:

E:\pgtemp>"c:/program files/postgresql/9.1/bin/pg_upgrade.exe" --old-datadir "e:/postgresdata" --new-datadir "e:\pgdata" --old-bindir "c:/program files/postgresql/9.0/bin" --new-bindir "c:/program files/postgresql/9.1/bin"
Performing Consistency Checks
-----------------------------
Checking current, bin, and data directories                 ok
Checking cluster versions                                   ok
Checking database user is a superuser                       ok
Checking for prepared transactions                          ok
Checking for reg* system oid user data types                ok
Checking for invalid indexes from concurrent index builds   ok
Checking for contrib/isn with bigint-passing mismatch       ok
Creating catalog dump                                       ok

There were problems executing ""c:/program files/postgresql/9.0/bin/pg_ctl" -w -l "nul" -D "e:/postgresdata"  stop >> "nul" 2>&1"
Failure, exiting

如何确定错误是什么,以及(更重要的是)如何解决错误/解决错误?

我尝试输入命令“c:/ program files / postgresql / 9.0 / bin / pg_ctl”-w -l“nul”-D“e:/ postgresdata”stop>> “nul”2>& 1逐字进入命令行并且没有收到任何错误.

从版本9.0.1升级到9.1.8

编辑:删除执行命令的临时目录的内容后(因为它留下了一些* .sql文件),然后删除它留在新目录中的postgresql.pid文件,并再次运行命令使用命令中的–logfile upgrade.log,这是日志输出:

Performing Consistency Checks
-----------------------------
Checking current, bin, and data directories                 ok
Checking cluster versions                                   ok
""c:/program files/postgresql/9.0/bin/pg_ctl" -w -l "nul" -D "e:/postgresdata" -o "-p 5432 -c autovacuum=off -c autovacuum_freeze_max_age=2000000000" start >> "nul" 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: SELECT c.oid, n.nspname, c.relname,  c.relfilenode, c.reltablespace, t.spclocation FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n        ON c.relnamespace = n.oid   LEFT OUTER JOIN pg_catalog.pg_tablespace t      ON c.reltablespace = t.oid WHERE relkind IN ('r','t', 'i', 'S') AND   ((n.nspname !~ '^pg_temp_' AND     n.nspname !~ '^pg_toast_temp_' AND     n.nspname NOT IN ('pg_catalog', 'information_schema', 'binary_upgrade') 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') )) ORDER BY 1;
executing: SELECT c.oid, n.nspname, c.relname,  c.relfilenode, c.reltablespace, t.spclocation FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n        ON c.relnamespace = n.oid   LEFT OUTER JOIN pg_catalog.pg_tablespace t      ON c.reltablespace = t.oid WHERE relkind IN ('r','t', 'i', 'S') AND   ((n.nspname !~ '^pg_temp_' AND     n.nspname !~ '^pg_toast_temp_' AND     n.nspname NOT IN ('pg_catalog', 'information_schema', 'binary_upgrade') 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') )) ORDER BY 1;
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 1 FROM    pg_catalog.pg_proc JOIN pg_namespace        ON pronamespace = pg_namespace.oid WHERE proname = 'plpython_call_handler' AND nspname = 'public' AND prolang = 13 /* C */ AND probin = '$libdir/plpython' AND pg_proc.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 1 FROM    pg_catalog.pg_proc JOIN pg_namespace        ON pronamespace = pg_namespace.oid WHERE proname = 'plpython_call_handler' AND nspname = 'public' AND prolang = 13 /* C */ AND probin = '$libdir/plpython' AND pg_proc.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 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 != 'pg_catalog' AND       n.nspname != '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 != 'pg_catalog' AND       n.nspname != 'information_schema'
ok
Checking for invalid indexes from concurrent index builds   executing: SELECT n.nspname, c.relname FROM pg_catalog.pg_class c,      pg_catalog.pg_namespace n,      pg_catalog.pg_index i WHERE (i.indisvalid = false OR         i.indisready = false) AND      i.indexrelid = c.oid AND        c.relnamespace = n.oid AND          n.nspname != 'pg_catalog' AND       n.nspname != 'information_schema' AND       n.nspname != 'pg_toast'
executing: SELECT n.nspname, c.relname FROM pg_catalog.pg_class c,      pg_catalog.pg_namespace n,      pg_catalog.pg_index i WHERE (i.indisvalid = false OR         i.indisready = false) AND      i.indexrelid = c.oid AND        c.relnamespace = n.oid AND          n.nspname != 'pg_catalog' AND       n.nspname != 'information_schema' AND       n.nspname != 'pg_toast'
ok
Checking for contrib/isn with bigint-passing mismatch       ok
Creating catalog dump                                       ""c:/program files/postgresql/9.1/bin/pg_dumpall" --port 5432 --username "postgres" --schema-only --binary-upgrade -f "E:\pgtemp/pg_upgrade_dump_all.sql""
ok
""c:/program files/postgresql/9.0/bin/pg_ctl" -w -l "nul" -D "e:/postgresdata"  stop >> "nul" 2>&1"
There were problems executing ""c:/program files/postgresql/9.0/bin/pg_ctl" -w -l "nul" -D "e:/postgresdata"  stop >> "nul" 2>&1"
""c:/program files/postgresql/9.0/bin/pg_ctl" -w -l "nul" -D "e:/postgresdata" -m fast stop >> "nul" 2>&1"
There were problems executing ""c:/program files/postgresql/9.0/bin/pg_ctl" -w -l "nul" -D "e:/postgresdata" -m fast stop >> "nul" 2>&1"
最佳答案
哇,好问题. PG 9.2大大改进了pg_upgrade日志记录,因为你在这里看到的确切原因—故障报告不好,特别是在我们无法将两个流输出到同一文件的Windows上.你有没有理由去9.1而不是9.2?

停止失败也是奇怪的,而开始工作.通常失败是服务器启动.您使用任何非默认端口或任何东西?

转载注明原文:postgresql – 在Windows上pg_upl期间从9.0到9.1执行pg_ctl的问题 - 代码日志