From: | "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com> |
---|---|
To: | Greg Nancarrow <gregn4422(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com> |
Cc: | "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Smith <smithpb2250(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Rahila Syed <rahilasyed90(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Subject: | RE: Added schema level support for publication. |
Date: | 2021-10-13 08:57:00 |
Message-ID: | OS0PR01MB6113E8695060774C51D8B378FBB79@OS0PR01MB6113.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wednesday, October 13, 2021 4:10 PM Greg Nancarrow <gregn4422(at)gmail(dot)com> wrote:
> Also, I found the following scenario where the data is double-published:
>
> (1) PUB: CREATE PUBLICATION pub FOR TABLE sch1.sale_201901, TABLE
> sch1.sale_201902 WITH (publish_via_partition_root=true);
> (2) SUB: CREATE SUBSCRIPTION sub CONNECTION 'dbname=postgres
> host=localhost port=5432' PUBLICATION pub;
> (3) PUB: INSERT INTO sch.sale VALUES('2019-01-01', 'AU', 'cpu', 5),
> ('2019-01-02', 'AU', 'disk', 8);
> (4) SUB: SELECT * FROM sch.sale;
> (5) PUB: ALTER PUBLICATION pub ADD ALL TABLES IN SCHEMA sch;
> (6) SUB: ALTER SUBSCRIPTION sub REFRESH PUBLICATION;
> (7) SUB: SELECT * FROM sch.sale;
>
> sale_date | country_code | product_sku | units
> ------------+--------------+-------------+-------
> 2019-01-01 | AU | cpu | 5
> 2019-01-02 | AU | disk | 8
> 2019-01-01 | AU | cpu | 5
> 2019-01-02 | AU | disk | 8
>
>
I changed your test step in (5) and used "ADD TABLE" command as below:
ALTER PUBLICATION pub ADD TABLE sch.sale;
I could get the same result on HEAD.
So I think it's not a problem related to this patch.
Maybe we can post this issue in a new thread.
Regards
Tang
From | Date | Subject | |
---|---|---|---|
Next Message | Bharath Rupireddy | 2021-10-13 09:06:47 | Re: should we allow users with a predefined role to access pg_backend_memory_contexts view and pg_log_backend_memory_contexts function?gr |
Previous Message | Stephen Frost | 2021-10-13 08:48:51 | Re: should we allow users with a predefined role to access pg_backend_memory_contexts view and pg_log_backend_memory_contexts function?gr |