From: | "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | [BUG] Unexpected action when publishing partition tables |
Date: | 2021-09-06 07:58:50 |
Message-ID: | OS0PR01MB6113D77F583C922F1CEAA1C3FBD29@OS0PR01MB6113.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi
I met a problem when using logical replication. Maybe it's a bug in logical replication.
When publishing a partition table without replica identity, update
or delete operation can be successful in some cases.
For example:
create table tbl1 (a int) partition by range ( a );
create table tbl1_part1 partition of tbl1 for values from (1) to (101);
create table tbl1_part2 partition of tbl1 for values from (101) to (200);
insert into tbl1 select generate_series(1, 10);
delete from tbl1 where a=1;
create publication pub for table tbl1;
delete from tbl1 where a=2;
The last DELETE statement can be executed successfully, but it should report
error message about missing a replica identity.
I found this problem on HEAD and I could reproduce this problem at PG13 and
PG14. (Logical replication of partition table was introduced in PG13.)
Regards
Tang
From | Date | Subject | |
---|---|---|---|
Next Message | 蔡梦娟 (玊于) | 2021-09-06 08:03:43 | 回复:Queries that should be canceled will get stuck on secure_write function |
Previous Message | Masahiro Ikeda | 2021-09-06 07:48:35 | Re: Allow escape in application_name |