PostgreSQL - 还原数据库时出现错误

3
我正在使用pgAdmin 4,并需要恢复数据库,但出现以下错误: 我让作业数为空,角色名称为“postgres”。
pg_restore: connecting to database for restore
pg_restore: creating SCHEMA "public"
pg_restore: creating COMMENT "SCHEMA public"
pg_restore: creating SCHEMA "tiger"
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 8; 2615 18151 SCHEMA tiger postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  schema "tiger" already exists
    Command was: CREATE SCHEMA tiger;



pg_restore: creating EXTENSION "fuzzystrmatch"
pg_restore: creating COMMENT "EXTENSION fuzzystrmatch"
pg_restore: creating EXTENSION "postgis"
pg_restore: creating COMMENT "EXTENSION postgis"
pg_restore: creating EXTENSION "postgis_tiger_geocoder"
pg_restore: creating COMMENT "EXTENSION postgis_tiger_geocoder"
pg_restore: creating SCHEMA "topology"
pg_restore: [archiver (db)] Error from TOC entry 7; 2615 17881 SCHEMA topology postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  schema "topology" already exists
    Command was: CREATE SCHEMA topology;

这里,我没有出现错误,但在最后一行,错误出现了。

pg_restore: creating EXTENSION "plpgsql"
pg_restore: creating COMMENT "EXTENSION plpgsql"
pg_restore: creating EXTENSION "address_standardizer"
pg_restore: creating COMMENT "EXTENSION address_standardizer"
pg_restore: creating EXTENSION "ogr_fdw"
pg_restore: creating COMMENT "EXTENSION ogr_fdw"
pg_restore: creating EXTENSION "pgrouting"
pg_restore: creating COMMENT "EXTENSION pgrouting"
pg_restore: creating EXTENSION "pointcloud"
pg_restore: creating COMMENT "EXTENSION pointcloud"
pg_restore: creating EXTENSION "pointcloud_postgis"
pg_restore: creating COMMENT "EXTENSION pointcloud_postgis"
pg_restore: creating EXTENSION "postgis_sfcgal"
pg_restore: creating COMMENT "EXTENSION postgis_sfcgal"
pg_restore: creating EXTENSION "postgis_topology"
pg_restore: creating COMMENT "EXTENSION postgis_topology"
pg_restore: creating TABLE "public.angkot"
pg_restore: creating TABLE "public.det_fasilitas"
pg_restore: creating TABLE "public.det_kegiatan"
pg_restore: creating TABLE "public.det_khatib"
pg_restore: creating TABLE "public.detail_angkot"
pg_restore: creating TABLE "public.fasilitas"
pg_restore: creating TABLE "public.hotel_region"
pg_restore: creating SEQUENCE "public.hotel_region_gid_seq"
pg_restore: creating SEQUENCE OWNED BY "public.hotel_region_gid_seq"
pg_restore: creating SEQUENCE "public.id_keg_seq"
pg_restore: creating TABLE "public.industri_kecil"
pg_restore: creating TABLE "public.jenis_kegiatan"
pg_restore: creating TABLE "public.kategori"
pg_restore: creating TABLE "public.kategori_rm"
pg_restore: creating TABLE "public.kecamatan"
pg_restore: creating TABLE "public.kegiatan"
pg_restore: creating TABLE "public.kondisi_fasilitas"
pg_restore: creating TABLE "public.rm"
pg_restore: creating SEQUENCE "public.kuliner_region_gid_seq"
pg_restore: creating SEQUENCE OWNED BY "public.kuliner_region_gid_seq"
pg_restore: creating TABLE "public.login"
pg_restore: creating SEQUENCE "public.masjid_sq"
pg_restore: creating TABLE "public.mesjid"
pg_restore: creating TABLE "public.objek_wisata"
pg_restore: creating TABLE "public.ustad"
pg_restore: creating DEFAULT "public.gid"
pg_restore: creating DEFAULT "public.gid"
pg_restore: processing data for table "public.angkot"
pg_restore: processing data for table "public.det_fasilitas"
pg_restore: processing data for table "public.det_kegiatan"
pg_restore: processing data for table "public.det_khatib"
pg_restore: processing data for table "public.detail_angkot"
pg_restore: processing data for table "public.fasilitas"
pg_restore: processing data for table "public.hotel_region"
pg_restore: executing SEQUENCE SET hotel_region_gid_seq
pg_restore: executing SEQUENCE SET id_keg_seq

好的,仍在良好运行中

pg_restore: processing data for table "public.industri_kecil"
pg_restore: processing data for table "public.jenis_kegiatan"
pg_restore: processing data for table "public.kategori"
pg_restore: processing data for table "public.kategori_rm"
pg_restore: processing data for table "public.kecamatan"
pg_restore: processing data for table "public.kegiatan"
pg_restore: processing data for table "public.kondisi_fasilitas"
pg_restore: executing SEQUENCE SET kuliner_region_gid_seq
pg_restore: processing data for table "public.login"
pg_restore: executing SEQUENCE SET masjid_sq
pg_restore: processing data for table "public.mesjid"
pg_restore: processing data for table "public.objek_wisata"
pg_restore: processing data for table "public.pointcloud_formats"
pg_restore: processing data for table "public.rm"
pg_restore: processing data for table "public.spatial_ref_sys"
pg_restore: processing data for table "public.ustad"
pg_restore: processing data for table "tiger.geocode_settings"
pg_restore: processing data for table "tiger.pagc_gaz"
pg_restore: processing data for table "tiger.pagc_lex"
pg_restore: processing data for table "tiger.pagc_rules"
pg_restore: processing data for table "topology.topology"
pg_restore: processing data for table "topology.layer"
pg_restore: creating CONSTRAINT "public.det_kegiatan_pkey"
pg_restore: creating CONSTRAINT "public.hotel_region_pkey"
pg_restore: creating CONSTRAINT "public.id"
pg_restore: creating CONSTRAINT "public.id_angkot"
pg_restore: creating CONSTRAINT "public.id_detail_angkot"
pg_restore: creating CONSTRAINT "public.id_fasilitas"
pg_restore: creating CONSTRAINT "public.id_jenis_keg"
pg_restore: creating CONSTRAINT "public.id_kategori"
pg_restore: creating CONSTRAINT "public.id_keg"
pg_restore: creating CONSTRAINT "public.id_khatib"
pg_restore: creating CONSTRAINT "public.id_kondisi"
pg_restore: creating CONSTRAINT "public.id_masjid"
pg_restore: creating CONSTRAINT "public.industri_kecil_region_pkey"
pg_restore: creating CONSTRAINT "public.kecamatan_pkey"
pg_restore: creating CONSTRAINT "public.kuliner_region_pkey"
pg_restore: creating CONSTRAINT "public.objek_wisata_pk"
pg_restore: creating CONSTRAINT "public.tgl_khatib"
pg_restore: creating CONSTRAINT "public.username"
pg_restore: creating INDEX "public.hotel_region_geom_idx"
pg_restore: creating INDEX "public.industri_kecil_region_geom_idx"
pg_restore: creating INDEX "public.kecamatan_region_geom_gist"
pg_restore: creating INDEX "public.kuliner_region_geom_idx"
pg_restore: creating INDEX "public.mesjid_region_geom_idx"
pg_restore: creating FK CONSTRAINT "public.angkot_id"
pg_restore: creating FK CONSTRAINT "public.id"
pg_restore: creating FK CONSTRAINT "public.id_fasilitas"
pg_restore: creating FK CONSTRAINT "public.id_jenis_kegiatan"
pg_restore: creating FK CONSTRAINT "public.id_kat"
pg_restore: creating FK CONSTRAINT "public.id_kategori"
pg_restore: creating FK CONSTRAINT "public.id_keg"
pg_restore: creating FK CONSTRAINT "public.id_khatib"
pg_restore: creating FK CONSTRAINT "public.id_kondisi"
pg_restore: creating FK CONSTRAINT "public.id_masjid"
pg_restore: creating FK CONSTRAINT "public.id_masjid"
pg_restore: creating FK CONSTRAINT "public.id_masjid"
pg_restore: creating FK CONSTRAINT "public.id_ustad"
pg_restore: creating FK CONSTRAINT "public.username"
pg_restore: creating ACL "public"

这里是错误信息

WARNING: errors ignored on restore: 2

状态为1,执行失败。如何解决?谢谢。
1个回答

2

实际上,这是一个警告信息,并且成功导入了所有表格。检查公共模式和表格,你会发现已经成功导入了所需的数据。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接