我正在用PostgreSQLv9.5使用Pglogical测试逻辑复制。
简单的配置似乎没问题。它的意思是:
但是,订阅包含来自特定架构的表的新replication_set不起作用。
此命令已传递(在提供者节点中):
select pglogical.replication_set_add_all_tables(
set_name := 'new_replication_set',
schema_names := '{myschema}',
synchronize_data := 'true'
);此命令传递(在订阅服务器节点中):
select pglogical.create_subscription(
subscription_name := 'subscription',
replication_sets := array['new_replication_set'],
provider_dsn := 'host=10.20.30.40 port=6432 dbname=production user=pglogical_prod',
synchronize_data := 'true'
);我漏掉了什么?谢谢和问候。
select pglogical.alter_subscription_synchronize(...)和select pglogical.alter_subscription_resynchronize_table(...)命令,select * from pglogical.queue;请求不是空的。下面是从订阅服务器节点获取的日志消息:
我在订阅节点中设置了log_min_message = debug5。
下面是错误消息:
792 < 2018-03-14 11:38:56.449 CET >LOG: starting apply for subscription subscription
793 < 2018-03-14 11:38:56.449 CET >DEBUG: StartTransaction
794 < 2018-03-14 11:38:56.449 CET >DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1 /0, nestlvl: 1, children:
795 < 2018-03-14 11:38:56.449 CET >DEBUG: CommitTransaction
796 < 2018-03-14 11:38:56.449 CET >DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1 /0, nestlvl: 1, children:
797 < 2018-03-14 11:38:56.449 CET >ERROR: subscriber subscription initialization failed during nonrecoverable step (d) , please try the setup again
798 < 2018-03-14 11:38:56.449 CET >DEBUG: shmem_exit(1): 2 before_shmem_exit callbacks to make
799 < 2018-03-14 11:38:56.449 CET >LOG: apply worker [16870] at slot 1 generation 4 exiting with error
800 < 2018-03-14 11:38:56.449 CET >DEBUG: shmem_exit(1): 6 on_shmem_exit callbacks to make
801 < 2018-03-14 11:38:56.449 CET >DEBUG: proc_exit(1): 2 callbacks to make
802 < 2018-03-14 11:38:56.449 CET >DEBUG: exit(1)
803 < 2018-03-14 11:38:56.449 CET >DEBUG: shmem_exit(-1): 0 before_shmem_exit callbacks to make
804 < 2018-03-14 11:38:56.449 CET >DEBUG: shmem_exit(-1): 0 on_shmem_exit callbacks to make
805 < 2018-03-14 11:38:56.449 CET >DEBUG: proc_exit(-1): 0 callbacks to make
806 < 2018-03-14 11:38:56.450 CET >DEBUG: reaping dead processes
807 < 2018-03-14 11:38:56.450 CET >LOG: worker process: pglogical apply 16385:2875150205 (PID 16870) exited with exit code 1谢谢和问候。
发布于 2018-03-14 13:02:54
订阅服务器节点中的表和架构名称必须与提供程序节点相同。在下面的错误消息中,如果名称在两个节点之间是不同的:
>LOG: starting apply for subscription subscription
>INFO: initializing subscriber subscription
>INFO: synchronizing data
>ERROR: schema "myschema" does not exist
>LOG: starting apply for subscription subscription
>INFO: initializing subscriber subscription
>INFO: synchronizing data
>ERROR: relation "myschema.tblprod2" does not exist复制开始工作了。
https://dba.stackexchange.com/questions/200091
复制相似问题