Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nacos-plugin-2.2.x 中nacos-pg.sql导入postgresql失败 #47

Open
wangchenglonggithub opened this issue Aug 2, 2024 · 0 comments
Open

Comments

@wangchenglonggithub
Copy link

wangchenglonggithub commented Aug 2, 2024

项目版本:

tag:[2.2.x] (https://github.com/nacos-group/nacos-plugin/releases/tag/2.2.x)

脚本位置:

nacos-postgresql-datasource-plugin-ext/src/main/resources/schem

数据库:

PostgreSQL

导入psql报错:

Task execution failed, reason: NOTICE:  table "config_info" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "config_info_id_seq" for serial column "config_info.id"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "config_info_id_key" for table "config_info"
NOTICE:  table "config_info_aggr" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "config_info_aggr_id_seq" for serial column "config_info_aggr.id"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "config_info_aggr_id_key" for table "config_info_aggr"
NOTICE:  table "config_info_beta" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "config_info_beta_id_seq" for serial column "config_info_beta.id"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "config_info_beta_id_key" for table "config_info_beta"
NOTICE:  table "config_info_tag" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "config_info_tag_id_seq" for serial column "config_info_tag.id"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "config_info_tag_id_key" for table "config_info_tag"
NOTICE:  table "config_tags_relation" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "config_tags_relation_id_seq" for serial column "config_tags_relation.id"
NOTICE:  CREATE TABLE will create implicit sequence "config_tags_relation_nid_seq" for serial column "config_tags_relation.nid"
ERROR:  Incorrect table definition, there can be only one auto_increment column
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
NOTICE:  table "group_capacity" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "group_capacity_id_seq" for serial column "group_capacity.id"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "group_capacity_id_key" for table "group_capacity"
NOTICE:  table "his_config_info" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "his_config_info_nid_seq" for serial column "his_config_info.nid"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "his_config_info_nid_key" for table "his_config_info"
NOTICE:  table "permissions" does not exist, skipping
NOTICE:  table "roles" does not exist, skipping
NOTICE:  table "tenant_capacity" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "tenant_capacity_id_seq" for serial column "tenant_capacity.id"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "tenant_capacity_id_key" for table "tenant_capacity"
NOTICE:  table "tenant_info" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "tenant_info_id_seq" for serial column "tenant_info.id"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "tenant_info_id_key" for table "tenant_info"
NOTICE:  table "users" does not exist, skipping
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "config_info_pkey" for table "config_info"
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "config_info_aggr_pkey" for table "config_info_aggr"
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "config_info_beta_pkey" for table "config_info_beta"
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "config_info_tag_pkey" for table "config_info_tag"
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "group_capacity_pkey" for table "group_capacity"
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "his_config_info_pkey" for table "his_config_info"
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "tenant_capacity_pkey" for table "tenant_capacity"

Task execution failed, reason: NOTICE:  table "config_info" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "config_info_id_seq" for serial column "config_info.id"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "config_info_id_key" for table "config_info"
NOTICE:  table "config_info_aggr" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "config_info_aggr_id_seq" for serial column "config_info_aggr.id"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "config_info_aggr_id_key" for table "config_info_aggr"
NOTICE:  table "config_info_beta" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "config_info_beta_id_seq" for serial column "config_info_beta.id"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "config_info_beta_id_key" for table "config_info_beta"
NOTICE:  table "config_info_tag" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "config_info_tag_id_seq" for serial column "config_info_tag.id"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "config_info_tag_id_key" for table "config_info_tag"
NOTICE:  table "config_tags_relation" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "config_tags_relation_id_seq" for serial column "config_tags_relation.id"
NOTICE:  CREATE TABLE will create implicit sequence "config_tags_relation_nid_seq" for serial column "config_tags_relation.nid"
ERROR:  Incorrect table definition, there can be only one auto_increment column
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
NOTICE:  table "group_capacity" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "group_capacity_id_seq" for serial column "group_capacity.id"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "group_capacity_id_key" for table "group_capacity"
NOTICE:  table "his_config_info" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "his_config_info_nid_seq" for serial column "his_config_info.nid"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "his_config_info_nid_key" for table "his_config_info"
NOTICE:  table "permissions" does not exist, skipping
NOTICE:  table "roles" does not exist, skipping
NOTICE:  table "tenant_capacity" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "tenant_capacity_id_seq" for serial column "tenant_capacity.id"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "tenant_capacity_id_key" for table "tenant_capacity"
NOTICE:  table "tenant_info" does not exist, skipping
NOTICE:  CREATE TABLE will create implicit sequence "tenant_info_id_seq" for serial column "tenant_info.id"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "tenant_info_id_key" for table "tenant_info"
NOTICE:  table "users" does not exist, skipping
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "config_info_pkey" for table "config_info"
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "config_info_aggr_pkey" for table "config_info_aggr"
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "config_info_beta_pkey" for table "config_info_beta"
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "config_info_tag_pkey" for table "config_info_tag"
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
ERROR:  relation "config_tags_relation" does not exist
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "group_capacity_pkey" for table "group_capacity"
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "his_config_info_pkey" for table "his_config_info"
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "tenant_capacity_pkey" for table "tenant_capacity"

原因:

重复的自增列:每个表只能有一个自增列,而config_tags_relation表定义了两个自增列(id和nid),因此报错。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant