pg_dumpall因PostGIS错误而失败

时间:2015-02-13 08:23:16

标签: postgresql postgis

我有一个大型(50+ GB)Postgres集群,我试图在9.2上备份以升级到9.4。服务器是CentOS 6.6。

当我运行pg_dumpall时,它会达到大约48GB,然后失败并显示:

pg_dump: [archiver (db)] query failed: ERROR:  could not access file "$libdir/postgis-2.0": No such file or directory
pg_dump: [archiver (db)] query was: SELECT a.attnum, a.attname, a.atttypmod, a.attstattarget, a.attstorage, t.typstorage, a.attnotnull, a.atthasdef, a.attisdropped, a.attlen, a.attalign, a.attislocal, pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname, array_to_string(a.attoptions, ', ') AS attoptions, CASE WHEN a.attcollation <> t.typcollation THEN a.attcollation ELSE 0 END AS attcollation, pg_catalog.array_to_string(ARRAY(SELECT pg_catalog.quote_ident(option_name) || ' ' || pg_catalog.quote_literal(option_value) FROM pg_catalog.pg_options_to_table(attfdwoptions) ORDER BY option_name), E',
    ') AS attfdwoptions FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t ON a.atttypid = t.oid WHERE a.attrelid = '18040917'::pg_catalog.oid AND a.attnum > 0::pg_catalog.int2 ORDER BY a.attrelid, a.attnum

以下是“select version();”的输出:

PostgreSQL 9.2.10 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11), 64-bit

以下是“SELECT PostGIS_full_version();”的结果:

POSTGIS="2.1.5 r13152" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.6" LIBJSON="UNKNOWN" TOPOLOGY RASTER

似乎有些东西指向PostGIS 2.0(早已不复存在)。

如何获得完整转储以便升级到9.4?

更重要的是,我如何解决这个问题,以便在升级的任何时候都不会遇到这种情况?

更新:这最终成为集群中尚未使用的旧数据库,无论出于何种原因尚未更新到更高版本的PostGIS。删除后,备份和升级顺利进行。

0 个答案:

没有答案