pg_dump备份失败,错误信息提示pg_dump: [archiver (db)] query failed: ERROR: schema "pgs_distribution_metadata" does not exist-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

pg_dump备份失败,错误信息提示pg_dump: [archiver (db)] query failed: ERROR: schema "pgs_distribution_metadata" does not exist

2016-05-14 00:57:43 8425 2

用pg_dump备份失败,错误信息提示pg_dump: [archiver (db)] query failed: ERROR: schema "pgs_distribution_metadata" does not exist

[postgres@node1 backup]$ pg_dump -Fc shop > shop.dump
pg_dump: [archiver (db)] query failed: ERROR: schema "pgs_distribution_metadata" does not exist
pg_dump: [archiver (db)] query was: COPY public.chars (chr) TO stdout;

postgres=# dn

       List of schemas
       Name            |  Owner
pgs_distribution_metadata postgres
public postgres

(2 rows)

尝试删除 pgs_distribution_metadata,后再试

postgres=# drop schema pgs_distribution_metadata cascade;
ERROR: cannot drop schema pgs_distribution_metadata because extension pg_shard requires it
HINT: You can drop extension pg_shard instead.

postgres=# drop extension pg_shard cascade;
DROP EXTENSION

postgres=# dn
List of schemas

Name Owner
public postgres

(1 row)

同事注释掉postgresql.con里关于pg_shard的相关设定,

shared_preload_libraries = 'pg_shard' # (change requires restart)

restart后再试,用pg_dump备份依然失败

[postgres@node1 backup]$ pg_dump -Fc shop > shop.dump
pg_dump: [archiver (db)] query failed: ERROR: schema "pgs_distribution_metadata" does not exist
pg_dump: [archiver (db)] query was: COPY public.chars (chr) TO stdout;

寻求解决办法,谢谢!

取消 提交回答
全部回答(2)
  • simon007
    2019-07-17 19:03:05

    德哥,谢谢你的回复。
    我shop库的owner也是postgres。

    [postgres@node1 backup]$ psql
    psql (9.4.1)
    Type "help" for help.

    postgres=# set
    AUTOCOMMIT = 'on'
    PROMPT1 = '%/%R%# '
    PROMPT2 = '%/%R%# '
    PROMPT3 = '>> '
    VERBOSITY = 'default'
    VERSION = 'PostgreSQL 9.4.1 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit'
    DBNAME = 'postgres'
    USER = 'postgres'
    PORT = '5432'
    ENCODING = 'LATIN1'
    postgres=# l

                                 List of databases
        Name        |  Owner   | Encoding | Collate | Ctype |   Access privileges
    contrib_regression postgres UTF8 C C
    movies postgres UTF8 C C
    postgres postgres UTF8 C C
    re_bookstore postgres UTF8 C C
    shop postgres UTF8 C C
    supermarket postgres UTF8 C C
    template0 postgres UTF8 C C =c/postgres +
    postgres=CTc/postgres
    template1 postgres UTF8 C C postgres=CTc/postgres+

    我用pg_dump备份postrges库,依然出现同样的错误。

    [postgres@node1 backup]$ pg_dump -Fc postgres > postgres.dump
    pg_dump: [archiver (db)] query failed: ERROR: schema "pgs_distribution_metadata" does not exist
    pg_dump: [archiver (db)] query was: COPY public.customer_reviews (customer_id, review_date, review_rating, review_votes, review_helpful_votes, product_id, product_title, product_sales_rank, product_group, product_category, product_subcategory, similar_product_ids) TO stdout;

    麻烦你帮助详细解释一下该问题的发生原因及解决方案,谢谢!

    0 0
  • 德哥
    2019-07-17 19:03:05

    你备份的是shop库,所以在postgres库操作是没用的。

    0 0
添加回答
相关问答

0

回答

Failed to run ddltask-Schema evolution DDLs is not

2022-07-19 14:13:34 192浏览量 回答数 0

0

回答

rocketmq发送消息报错——not exist, apply first please

2020-12-15 11:00:22 1844浏览量 回答数 0

1

回答

spring 声明式事务aop mysql读写库的配置 问题 - java报错

2020-05-31 19:09:39 489浏览量 回答数 1

1

回答

nest metahub这个工具能够自动发现各个接入源的元数据的schema并导入到 #Flink

2020-05-19 17:11:08 1772浏览量 回答数 1

0

回答

RDS for MySQL中创建外键约束提示Cannot add foreign key constraint

2017-11-03 15:34:10 3040浏览量 回答数 0

2

回答

ftp上传文件后打开网站显示 internal server error

2017-09-21 10:14:10 4417浏览量 回答数 2

1

回答

jquery mobile a标签data-role="button"不被 $_SERVER["HTTP_REFERER"]支持,怎么办?

2016-07-11 16:22:16 2163浏览量 回答数 1

2

回答

tair问题:put failed ldbbucketxxxnot exist

2016-05-31 15:55:42 4293浏览量 回答数 2

3

回答

错误信息:Hostxxx.xxx.xxx.xxxis not allowed to connect to this MySQL server

2016-04-24 11:55:18 4436浏览量 回答数 3

1

回答

"smtp.exmail.qq.com" port 465, isSSL false

2016-03-11 13:09:11 12065浏览量 回答数 1
+关注
文章
问答
问答排行榜
最热
最新
相关电子书
更多
MongoShake -- Multi Active-Active and Cross-Region Disaster Recoverable MongoDB Service
立即下载
AliHB Real-Time Cold data Backup
立即下载
AliHB Real Time Cold data Backup
立即下载