RE: pg_get_publication_tables() output duplicate relid

2022-04-17 Thread houzj.f...@fujitsu.com
On Friday, April 15, 2022 12:46 AM Alvaro Herrera wrote: > > On 2022-Apr-11, houzj.f...@fujitsu.com wrote: > > > I have confirmed that the bug of ATTACH PARTITION has been fixed due to > recent > > commit 7f481b8. Currently, we always invalidate the RelationSyncCache when > > attaching a partit

Re: pg_get_publication_tables() output duplicate relid

2022-04-14 Thread Alvaro Herrera
On 2022-Apr-11, houzj.f...@fujitsu.com wrote: > I have confirmed that the bug of ATTACH PARTITION has been fixed due to recent > commit 7f481b8. Currently, we always invalidate the RelationSyncCache when > attaching a partition, so the pubactions of the newly attached partition will > be rebuilt c

RE: pg_get_publication_tables() output duplicate relid

2022-04-11 Thread houzj.f...@fujitsu.com
On Tuesday, December 14, 2021 3:42 PM houzj.f...@fujitsu.com wrote: > > On Sat, Nov 20, 2021 7:31 PM Amit Kapila wrote: > > On Fri, Nov 19, 2021 at 10:58 AM Amit Kapila > > wrote: > > > > > > On Fri, Nov 19, 2021 at 7:19 AM Amit Langote > > > > > wrote: > > > > > > > > The problematic case is

RE: pg_get_publication_tables() output duplicate relid

2021-12-13 Thread houzj.f...@fujitsu.com
On Sat, Nov 20, 2021 7:31 PM Amit Kapila wrote: > On Fri, Nov 19, 2021 at 10:58 AM Amit Kapila > wrote: > > > > On Fri, Nov 19, 2021 at 7:19 AM Amit Langote > wrote: > > > > > > The problematic case is attaching the partition *after* the > > > subscriber has already marked the root parent as syn

Re: pg_get_publication_tables() output duplicate relid

2021-12-08 Thread Amit Kapila
On Thu, Dec 2, 2021 at 8:42 AM Amit Langote wrote: > > On Thu, Dec 2, 2021 at 9:44 houzj.f...@fujitsu.com > wrote: > > On Wed, Dec 1, 2021 3:01 PM Amit Kapila wrote: > > > > > On Mon, Nov 22, 2021 at 12:55 PM Amit Langote > > > > > wrote: > > > > > > On second thought, I agree that de-duplicati

Re: pg_get_publication_tables() output duplicate relid

2021-12-07 Thread Amit Langote
On Tue, Dec 7, 2021 at 3:20 PM Amit Kapila wrote: > On Tue, Dec 7, 2021 at 10:52 AM Amit Langote wrote: > > So if a partition is > > explicitly present in a publication with a filter defined on it, I > > suppose following are the possible scenarios: > > > > * publish_via_partition_root=true > >

Re: pg_get_publication_tables() output duplicate relid

2021-12-06 Thread Amit Kapila
On Tue, Dec 7, 2021 at 10:52 AM Amit Langote wrote: > > On Tue, Dec 7, 2021 at 1:01 PM Amit Kapila wrote: > > On Mon, Dec 6, 2021 at 8:59 PM Amit Langote wrote: > > > On Mon, Dec 6, 2021 at 6:05 PM Amit Kapila > > > wrote: > > > > Your concern is not very clear to me. Can you be more specific

Re: pg_get_publication_tables() output duplicate relid

2021-12-06 Thread Amit Langote
On Tue, Dec 7, 2021 at 1:01 PM Amit Kapila wrote: > On Mon, Dec 6, 2021 at 8:59 PM Amit Langote wrote: > > On Mon, Dec 6, 2021 at 6:05 PM Amit Kapila wrote: > > > Your concern is not very clear to me. Can you be more specific in what > > > kind of problem you see with such a design for row filte

Re: pg_get_publication_tables() output duplicate relid

2021-12-06 Thread Amit Langote
On Tue, Dec 7, 2021 at 12:45 PM Amit Kapila wrote: > On Mon, Dec 6, 2021 at 8:04 PM Amit Langote wrote: > > So IIUC the scenario of concern is when a table to be attached as a > > partition is in a schema that's present in pg_publication_namespace. > > The only way to stop it from being published

Re: pg_get_publication_tables() output duplicate relid

2021-12-06 Thread Amit Kapila
On Mon, Dec 6, 2021 at 8:59 PM Amit Langote wrote: > > On Mon, Dec 6, 2021 at 6:05 PM Amit Kapila wrote: > > On Mon, Dec 6, 2021 at 1:00 PM Amit Langote wrote: > > > On Mon, Dec 6, 2021 at 3:55 PM houzj.f...@fujitsu.com > > > wrote: > > > > After thinking more on this. I find there might be som

Re: pg_get_publication_tables() output duplicate relid

2021-12-06 Thread Amit Kapila
On Mon, Dec 6, 2021 at 8:04 PM Amit Langote wrote: > > So IIUC the scenario of concern is when a table to be attached as a > partition is in a schema that's present in pg_publication_namespace. > The only way to stop it from being published is to move it to another > schema that is not published u

Re: pg_get_publication_tables() output duplicate relid

2021-12-06 Thread Amit Langote
On Mon, Dec 6, 2021 at 6:05 PM Amit Kapila wrote: > On Mon, Dec 6, 2021 at 1:00 PM Amit Langote wrote: > > On Mon, Dec 6, 2021 at 3:55 PM houzj.f...@fujitsu.com > > wrote: > > > After thinking more on this. I find there might be some usage about > > > adding both > > > child and parent to the p

Re: pg_get_publication_tables() output duplicate relid

2021-12-06 Thread Amit Langote
On Mon, Dec 6, 2021 at 1:59 PM Amit Kapila wrote: > On Fri, Dec 3, 2021 at 6:04 PM Amit Langote wrote: > > On Fri, Dec 3, 2021 at 12:37 PM Amit Kapila wrote: > > > On Thu, Dec 2, 2021 at 7:18 PM Amit Langote > > > wrote: > > > > Okay, I did write a PoC patch this morning after sending out my >

Re: pg_get_publication_tables() output duplicate relid

2021-12-06 Thread Amit Kapila
On Mon, Dec 6, 2021 at 1:00 PM Amit Langote wrote: > > On Mon, Dec 6, 2021 at 3:55 PM houzj.f...@fujitsu.com > wrote: > > On Thursday, December 2, 2021 9:48 PM Amit Langote > > wrote: > > > On Thu, Dec 2, 2021 at 2:27 PM Amit Kapila > > > wrote: > > > > On Thu, Dec 2, 2021 at 8:42 AM Amit Lan

Re: pg_get_publication_tables() output duplicate relid

2021-12-05 Thread Amit Langote
On Mon, Dec 6, 2021 at 3:55 PM houzj.f...@fujitsu.com wrote: > On Thursday, December 2, 2021 9:48 PM Amit Langote > wrote: > > On Thu, Dec 2, 2021 at 2:27 PM Amit Kapila wrote: > > > On Thu, Dec 2, 2021 at 8:42 AM Amit Langote > > wrote: > > > > Reading Alvaro's email at the top again gave me

RE: pg_get_publication_tables() output duplicate relid

2021-12-05 Thread houzj.f...@fujitsu.com
On Thursday, December 2, 2021 9:48 PM Amit Langote wrote: > On Thu, Dec 2, 2021 at 2:27 PM Amit Kapila wrote: > > On Thu, Dec 2, 2021 at 8:42 AM Amit Langote > wrote: > > > Reading Alvaro's email at the top again gave me a pause to > > > reconsider what I had said in reply. It might indeed hav

Re: pg_get_publication_tables() output duplicate relid

2021-12-05 Thread Amit Kapila
On Fri, Dec 3, 2021 at 6:04 PM Amit Langote wrote: > > On Fri, Dec 3, 2021 at 12:37 PM Amit Kapila wrote: > > On Thu, Dec 2, 2021 at 7:18 PM Amit Langote wrote: > > > On Thu, Dec 2, 2021 at 2:27 PM Amit Kapila > > > wrote: > > > > On Thu, Dec 2, 2021 at 8:42 AM Amit Langote > > > > wrote: >

Re: pg_get_publication_tables() output duplicate relid

2021-12-03 Thread Amit Langote
On Fri, Dec 3, 2021 at 21:34 Amit Langote wrote: > On Fri, Dec 3, 2021 at 12:37 PM Amit Kapila > wrote: > > On Thu, Dec 2, 2021 at 7:18 PM Amit Langote > wrote: > > > On Thu, Dec 2, 2021 at 2:27 PM Amit Kapila > wrote: > > > > On Thu, Dec 2, 2021 at 8:42 AM Amit Langote > wrote: > > > > > Rea

Re: pg_get_publication_tables() output duplicate relid

2021-12-03 Thread Amit Langote
On Fri, Dec 3, 2021 at 12:37 PM Amit Kapila wrote: > On Thu, Dec 2, 2021 at 7:18 PM Amit Langote wrote: > > On Thu, Dec 2, 2021 at 2:27 PM Amit Kapila wrote: > > > On Thu, Dec 2, 2021 at 8:42 AM Amit Langote > > > wrote: > > > > Reading Alvaro's email at the top again gave me a pause to recons

Re: pg_get_publication_tables() output duplicate relid

2021-12-02 Thread Amit Kapila
On Thu, Dec 2, 2021 at 7:18 PM Amit Langote wrote: > > On Thu, Dec 2, 2021 at 2:27 PM Amit Kapila wrote: > > On Thu, Dec 2, 2021 at 8:42 AM Amit Langote wrote: > > > Reading Alvaro's email at the top again gave me a pause to reconsider > > > what I had said in reply. It might indeed have been n

Re: pg_get_publication_tables() output duplicate relid

2021-12-02 Thread Amit Langote
On Thu, Dec 2, 2021 at 2:27 PM Amit Kapila wrote: > On Thu, Dec 2, 2021 at 8:42 AM Amit Langote wrote: > > Reading Alvaro's email at the top again gave me a pause to reconsider > > what I had said in reply. It might indeed have been nice if the > > publication DDL itself had prevented the cases

Re: pg_get_publication_tables() output duplicate relid

2021-12-01 Thread Amit Kapila
On Thu, Dec 2, 2021 at 8:42 AM Amit Langote wrote: > > On Thu, Dec 2, 2021 at 9:44 houzj.f...@fujitsu.com > wrote: > > On Wed, Dec 1, 2021 3:01 PM Amit Kapila wrote: > > > > > On Mon, Nov 22, 2021 at 12:55 PM Amit Langote > > > > > wrote: > > > > > > On second thought, I agree that de-duplicati

Re: pg_get_publication_tables() output duplicate relid

2021-12-01 Thread Amit Langote
On Thu, Dec 2, 2021 at 9:44 houzj.f...@fujitsu.com wrote: > On Wed, Dec 1, 2021 3:01 PM Amit Kapila wrote: > > > > On Mon, Nov 22, 2021 at 12:55 PM Amit Langote > > > > wrote: > > > > > On second thought, I agree that de-duplicating partitions from > > > > > this view is an improvement. > > > >

RE: pg_get_publication_tables() output duplicate relid

2021-12-01 Thread houzj.f...@fujitsu.com
On Wed, Dec 1, 2021 3:01 PM Amit Kapila wrote: > On Mon, Nov 29, 2021 at 2:37 PM houzj.f...@fujitsu.com > wrote: > > > > On Wed, Nov 24, 2021 4:48 PM Amit Kapila > > > On Mon, Nov 22, 2021 at 12:55 PM Amit Langote > > > > > > wrote: > > > > > > > > On Fri, Nov 19, 2021 at 2:28 PM Amit Kapila >

Re: pg_get_publication_tables() output duplicate relid

2021-11-30 Thread Amit Kapila
On Mon, Nov 29, 2021 at 2:37 PM houzj.f...@fujitsu.com wrote: > > On Wed, Nov 24, 2021 4:48 PM Amit Kapila > > On Mon, Nov 22, 2021 at 12:55 PM Amit Langote > > wrote: > > > > > > On Fri, Nov 19, 2021 at 2:28 PM Amit Kapila > > wrote: > > > > On Fri, Nov 19, 2021 at 7:19 AM Amit Langote > > wr

Re: pg_get_publication_tables() output duplicate relid

2021-11-30 Thread Amit Kapila
On Fri, Nov 26, 2021 at 8:38 AM Amit Kapila wrote: > > On Fri, Nov 26, 2021 at 7:10 AM houzj.f...@fujitsu.com > wrote: > > > > On Thursday, November 25, 2021 4:57 PM Amit Kapila > > wrote: > > > On Thu, Nov 25, 2021 at 1:30 PM Amit Langote > > > > > > > > I agree with backpatching the doc fix.

RE: pg_get_publication_tables() output duplicate relid

2021-11-29 Thread houzj.f...@fujitsu.com
On Wed, Nov 24, 2021 4:48 PM Amit Kapila > On Mon, Nov 22, 2021 at 12:55 PM Amit Langote > wrote: > > > > On Fri, Nov 19, 2021 at 2:28 PM Amit Kapila > wrote: > > > On Fri, Nov 19, 2021 at 7:19 AM Amit Langote > wrote: > > > > As in, > > > > do we know of any replication (initial/streaming) mi

Re: pg_get_publication_tables() output duplicate relid

2021-11-25 Thread Amit Kapila
On Fri, Nov 26, 2021 at 7:10 AM houzj.f...@fujitsu.com wrote: > > On Thursday, November 25, 2021 4:57 PM Amit Kapila > wrote: > > On Thu, Nov 25, 2021 at 1:30 PM Amit Langote > > > > > > I agree with backpatching the doc fix. I've attached a diff against > > > master, though it also appears to

RE: pg_get_publication_tables() output duplicate relid

2021-11-25 Thread houzj.f...@fujitsu.com
On Thursday, November 25, 2021 4:57 PM Amit Kapila wrote: > On Thu, Nov 25, 2021 at 1:30 PM Amit Langote > > > > I agree with backpatching the doc fix. I've attached a diff against > > master, though it also appears to apply to 13 and 14 branches. > > > > I think we can for publish_via_partit

Re: pg_get_publication_tables() output duplicate relid

2021-11-25 Thread Amit Langote
On Thu, Nov 25, 2021 at 5:57 PM Amit Kapila wrote: > On Thu, Nov 25, 2021 at 1:30 PM Amit Langote wrote: > > I agree with backpatching the doc fix. I've attached a diff against > > master, though it also appears to apply to 13 and 14 branches. > > I think we can for publish_via_partition_root,

Re: pg_get_publication_tables() output duplicate relid

2021-11-25 Thread Amit Kapila
On Thu, Nov 25, 2021 at 1:30 PM Amit Langote wrote: > > On Wed, Nov 24, 2021 at 5:44 PM Amit Kapila wrote: > > On Wed, Nov 24, 2021 at 12:02 PM Amit Langote > > wrote: > > > So yeah, documenting the ATTACH issue as a limitation sounds like the > > > best course for now. I might word it as foll

Re: pg_get_publication_tables() output duplicate relid

2021-11-25 Thread Amit Langote
On Wed, Nov 24, 2021 at 5:44 PM Amit Kapila wrote: > On Wed, Nov 24, 2021 at 12:02 PM Amit Langote wrote: > > So yeah, documenting the ATTACH issue as a limitation sounds like the > > best course for now. I might word it as follows and add it under > > Notes at https://www.postgresql.org/docs/cu

RE: pg_get_publication_tables() output duplicate relid

2021-11-24 Thread houzj.f...@fujitsu.com
On Wed, Nov 24, 2021 4:48 PM Amit Kapila wrote: > On Mon, Nov 22, 2021 at 12:55 PM Amit Langote > wrote: > > > > On Fri, Nov 19, 2021 at 2:28 PM Amit Kapila > wrote: > > > On Fri, Nov 19, 2021 at 7:19 AM Amit Langote > wrote: > > > > As in, > > > > do we know of any replication (initial/stream

Re: pg_get_publication_tables() output duplicate relid

2021-11-24 Thread Amit Kapila
On Mon, Nov 22, 2021 at 12:55 PM Amit Langote wrote: > > On Fri, Nov 19, 2021 at 2:28 PM Amit Kapila wrote: > > On Fri, Nov 19, 2021 at 7:19 AM Amit Langote > > wrote: > > > As in, > > > do we know of any replication (initial/streaming) misbehavior caused > > > by the duplicate partition OIDs

Re: pg_get_publication_tables() output duplicate relid

2021-11-24 Thread Amit Kapila
On Wed, Nov 24, 2021 at 12:02 PM Amit Langote wrote: > > On Tue, Nov 23, 2021 at 12:21 PM Amit Kapila wrote: > > Isn't it better to document this case and explain what > > users can expect instead of trying to design a solution around this? > > I thought about the problems you've described and it

Re: pg_get_publication_tables() output duplicate relid

2021-11-23 Thread Amit Langote
On Tue, Nov 23, 2021 at 12:21 PM Amit Kapila wrote: > Isn't it better to document this case and explain what > users can expect instead of trying to design a solution around this? I thought about the problems you've described and it looks like I hadn't considered many of the details which complic

Re: pg_get_publication_tables() output duplicate relid

2021-11-22 Thread Amit Kapila
On Tue, Nov 23, 2021 at 7:28 AM houzj.f...@fujitsu.com wrote: > > On Mon, Nov 22, 2021 6:48 PM Amit Kapila wrote: > > On Mon, Nov 22, 2021 at 1:45 PM Amit Langote > > wrote: > > > > > > On Sat, Nov 20, 2021 at 8:31 PM Amit Kapila > > wrote: > > > > On Fri, Nov 19, 2021 at 10:58 AM Amit Kapila

RE: pg_get_publication_tables() output duplicate relid

2021-11-22 Thread houzj.f...@fujitsu.com
On Mon, Nov 22, 2021 6:48 PM Amit Kapila wrote: > On Mon, Nov 22, 2021 at 1:45 PM Amit Langote > wrote: > > > > On Sat, Nov 20, 2021 at 8:31 PM Amit Kapila > wrote: > > > On Fri, Nov 19, 2021 at 10:58 AM Amit Kapila > wrote: > > > > On Fri, Nov 19, 2021 at 7:19 AM Amit Langote > wrote: > > > >

Re: pg_get_publication_tables() output duplicate relid

2021-11-22 Thread Amit Kapila
On Mon, Nov 22, 2021 at 1:45 PM Amit Langote wrote: > > On Sat, Nov 20, 2021 at 8:31 PM Amit Kapila wrote: > > On Fri, Nov 19, 2021 at 10:58 AM Amit Kapila > > wrote: > > > On Fri, Nov 19, 2021 at 7:19 AM Amit Langote > > > wrote: > > > > The problematic case is attaching the partition *after

Re: pg_get_publication_tables() output duplicate relid

2021-11-22 Thread Amit Langote
On Sat, Nov 20, 2021 at 8:31 PM Amit Kapila wrote: > On Fri, Nov 19, 2021 at 10:58 AM Amit Kapila wrote: > > On Fri, Nov 19, 2021 at 7:19 AM Amit Langote > > wrote: > > > The problematic case is attaching the partition *after* the subscriber > > > has already marked the root parent as synced an

Re: pg_get_publication_tables() output duplicate relid

2021-11-21 Thread Amit Langote
On Fri, Nov 19, 2021 at 2:28 PM Amit Kapila wrote: > On Fri, Nov 19, 2021 at 7:19 AM Amit Langote wrote: > > As in, > > do we know of any replication (initial/streaming) misbehavior caused > > by the duplicate partition OIDs in this case or is the only problem > > that pg_publication_tables outp

Re: pg_get_publication_tables() output duplicate relid

2021-11-20 Thread Amit Kapila
On Fri, Nov 19, 2021 at 10:58 AM Amit Kapila wrote: > > On Fri, Nov 19, 2021 at 7:19 AM Amit Langote wrote: > > > > The problematic case is attaching the partition *after* the subscriber > > has already marked the root parent as synced and/or ready for > > replication. Refreshing the subscriptio

Re: pg_get_publication_tables() output duplicate relid

2021-11-18 Thread Amit Kapila
On Fri, Nov 19, 2021 at 7:19 AM Amit Langote wrote: > > On Thu, Nov 18, 2021 at 1:53 PM Amit Kapila wrote: > > > > AFAICU, there are actually two problems related to > > pg_publication_tables view that are being discussed: (a) when > > 'publish_via_partition_root' is true then it returns both par

Re: pg_get_publication_tables() output duplicate relid

2021-11-18 Thread Amit Langote
On Thu, Nov 18, 2021 at 1:53 PM Amit Kapila wrote: > On Wed, Nov 17, 2021 at 11:39 AM Amit Langote wrote: > > What IS problematic is what a subscriber sees in the > > pg_publication_tables view and the problem occurs only in the initial > > sync phase, where the partition is synced duplicatively

Re: pg_get_publication_tables() output duplicate relid

2021-11-17 Thread Bharath Rupireddy
On Thu, Nov 18, 2021 at 10:23 AM Amit Kapila wrote: > (b) when 'publish_via_partition_root' is false, then it > returns duplicate entries for child tables (provided both are part of > publication), this problem is being discussed in this thread. +1 to just focus on fixing the initial problem prop

Re: pg_get_publication_tables() output duplicate relid

2021-11-17 Thread Amit Kapila
On Wed, Nov 17, 2021 at 11:39 AM Amit Langote wrote: > > On Tue, Nov 16, 2021 at 10:27 PM Amit Kapila wrote: > > On Mon, Nov 15, 2021 at 7:12 PM Alvaro Herrera > > wrote: > > > > On Mon, Nov 15, 2021 at 1:48 PM houzj.f...@fujitsu.com > > > > wrote: > > > > > > > > create table tbl1 (a int) par

Re: pg_get_publication_tables() output duplicate relid

2021-11-17 Thread Amit Langote
On Thu, Nov 18, 2021 at 9:33 houzj.f...@fujitsu.com wrote: > On Wed, Nov 17, 2021 2:18 PM Amit Langote wrote: > > On Wed, Nov 17, 2021 at 12:15 PM houzj.f...@fujitsu.com > > wrote: > > > On Wed, Nov 17, 2021 10:47 AM Amit Kapila > > wrote: > > > > On Tue, Nov 16, 2021 at 7:21 AM houzj.f...@fuj

RE: pg_get_publication_tables() output duplicate relid

2021-11-17 Thread houzj.f...@fujitsu.com
On Wed, Nov 17, 2021 2:18 PM Amit Langote wrote: > On Wed, Nov 17, 2021 at 12:15 PM houzj.f...@fujitsu.com > wrote: > > On Wed, Nov 17, 2021 10:47 AM Amit Kapila > wrote: > > > On Tue, Nov 16, 2021 at 7:21 AM houzj.f...@fujitsu.com wrote: > > > > If we decide to disallow this case, we seem need

Re: pg_get_publication_tables() output duplicate relid

2021-11-17 Thread Amit Langote
On Wed, Nov 17, 2021 at 3:09 PM Amit Langote wrote: > Though I now tend > to agree with Amit K that that may be such a meaningful and all that > common use case, Oops I meant: that may NOT be such... -- Amit Langote EDB: http://www.enterprisedb.com

Re: pg_get_publication_tables() output duplicate relid

2021-11-16 Thread Amit Langote
On Wed, Nov 17, 2021 at 12:15 PM houzj.f...@fujitsu.com wrote: > On Wed, Nov 17, 2021 10:47 AM Amit Kapila wrote: > > On Tue, Nov 16, 2021 at 7:21 AM houzj.f...@fujitsu.com wrote: > > > If we decide to disallow this case, we seem need to handle some other > > > cases as well, for example: We migh

Re: pg_get_publication_tables() output duplicate relid

2021-11-16 Thread Amit Langote
On Tue, Nov 16, 2021 at 10:27 PM Amit Kapila wrote: > On Mon, Nov 15, 2021 at 7:12 PM Alvaro Herrera > wrote: > > > On Mon, Nov 15, 2021 at 1:48 PM houzj.f...@fujitsu.com > > > wrote: > > > > > > create table tbl1 (a int) partition by range (a); > > > > create table tbl1_part1 partition of tbl1

RE: pg_get_publication_tables() output duplicate relid

2021-11-16 Thread houzj.f...@fujitsu.com
On Wed, Nov 17, 2021 10:47 AM Amit Kapila wrote: > On Tue, Nov 16, 2021 at 7:21 AM houzj.f...@fujitsu.com > wrote: > > > > On Mon, Nov 15, 2021 9:42 PM Alvaro Herrera > wrote: > > > > On Mon, Nov 15, 2021 at 1:48 PM houzj.f...@fujitsu.com > > > > wrote: > > > > > > > > create table tbl1 (a int)

Re: pg_get_publication_tables() output duplicate relid

2021-11-16 Thread Amit Kapila
On Tue, Nov 16, 2021 at 7:21 AM houzj.f...@fujitsu.com wrote: > > On Mon, Nov 15, 2021 9:42 PM Alvaro Herrera wrote: > > > On Mon, Nov 15, 2021 at 1:48 PM houzj.f...@fujitsu.com > > > wrote: > > > > > > create table tbl1 (a int) partition by range (a); create table > > > > tbl1_part1 partition o

Re: pg_get_publication_tables() output duplicate relid

2021-11-16 Thread Amit Kapila
On Mon, Nov 15, 2021 at 7:12 PM Alvaro Herrera wrote: > > > On Mon, Nov 15, 2021 at 1:48 PM houzj.f...@fujitsu.com > > wrote: > > > > create table tbl1 (a int) partition by range (a); > > > create table tbl1_part1 partition of tbl1 for values from (1) to (10); > > > create table tbl1_part2 partit

RE: pg_get_publication_tables() output duplicate relid

2021-11-15 Thread houzj.f...@fujitsu.com
On Mon, Nov 15, 2021 9:42 PM Alvaro Herrera wrote: > > On Mon, Nov 15, 2021 at 1:48 PM houzj.f...@fujitsu.com > > wrote: > > > > create table tbl1 (a int) partition by range (a); create table > > > tbl1_part1 partition of tbl1 for values from (1) to (10); create > > > table tbl1_part2 partition

RE: pg_get_publication_tables() output duplicate relid

2021-11-15 Thread houzj.f...@fujitsu.com
On Mon, Nov 15, 2021 6:17 PM Bharath Rupireddy wrote: > On Mon, Nov 15, 2021 at 1:48 PM houzj.f...@fujitsu.com > wrote: > > > > Hi hackers, > > > > In another thread[1], we found the pg_get_publication_tables function > > will output duplicate partition relid when adding both child and > > paren

Re: pg_get_publication_tables() output duplicate relid

2021-11-15 Thread Alvaro Herrera
> On Mon, Nov 15, 2021 at 1:48 PM houzj.f...@fujitsu.com > wrote: > > create table tbl1 (a int) partition by range (a); > > create table tbl1_part1 partition of tbl1 for values from (1) to (10); > > create table tbl1_part2 partition of tbl1 for values from (10) to (20); > > create publication pub

Re: pg_get_publication_tables() output duplicate relid

2021-11-15 Thread Bharath Rupireddy
On Mon, Nov 15, 2021 at 1:48 PM houzj.f...@fujitsu.com wrote: > > Hi hackers, > > In another thread[1], we found the pg_get_publication_tables function will > output > duplicate partition relid when adding both child and parent table to the > publication(pubviaroot = false). > > Example: > create

pg_get_publication_tables() output duplicate relid

2021-11-15 Thread houzj.f...@fujitsu.com
Hi hackers, In another thread[1], we found the pg_get_publication_tables function will output duplicate partition relid when adding both child and parent table to the publication(pubviaroot = false). Example: create table tbl1 (a int) partition by range (a); create table tbl1_part1 partition of