RE: Skipping logical replication transactions on subscriber side

2021-09-13 Thread houzj.f...@fujitsu.com
From Thur, Sep 9, 2021 10:33 PM Masahiko Sawada wrote: > Sorry for the late response. I've attached the updated patches that > incorporate > all comments unless I missed something. Please review them. Thanks for the new version patches. Here are some comments for the v13-0001 patch. 1) +

RE: Added schema level support for publication.

2021-09-13 Thread houzj.f...@fujitsu.com
From Tue, Sept 14, 2021 11:53 AM Amit Kapila wrote: > On Mon, Sep 13, 2021 at 7:06 PM tanghy.f...@fujitsu.com > wrote: > > > > 6. > > I think if I use 'ALTER PUBLICATION ... SET', both the list of tables > > and the list of all tables in schemas should be reset. The publication > > should only c

RE: Logical replication keepalive flood

2021-09-15 Thread houzj.f...@fujitsu.com
From Tuesday, September 14, 2021 1:39 PM Greg Nancarrow wrote: > However, the problem I found is that, with the patch applied, there is > a test failure when running “make check-world”: > > t/006_logical_decoding.pl 4/14 > # Failed test 'pg_recvlogical acknowledged changes' > #

RE: [BUG] Unexpected action when publishing partition tables

2021-09-15 Thread houzj.f...@fujitsu.com
On Tuesday, September 14, 2021 10:41 PM vignesh C wrote: > On Tue, Sep 7, 2021 at 11:38 AM houzj.f...@fujitsu.com > wrote: > > > > > > Attach new version patches which addressed the comment. > > Thanks for fixing this issue. The bug gets fixed by the patch, I did

RE: Column Filtering in Logical Replication

2021-09-15 Thread houzj.f...@fujitsu.com
On Wednesday, September 15, 2021 8:19 PM vignesh C wrote: > I have extracted the parser code and attached it here, so that it will be > easy to > go through. We wanted to support the following syntax as in > [1]: > CREATE PUBLICATION pub1 FOR > TABLE t1,t2,t3, ALL TABLES IN SCHEMA s1,s2, SEQUENCE

RE: Added schema level support for publication.

2021-09-15 Thread houzj.f...@fujitsu.com
On Tuesday, September 14, 2021 4:39 PM vignesh C wrote: > > I have handled this in the patch attached. Thanks for updating the patch. Here are some comments. 1) +static void +AlterPublicationSchemas(AlterPublicationStmt *stmt, Relation rel, ... + /* +* If the table

RE: Column Filtering in Logical Replication

2021-09-16 Thread houzj.f...@fujitsu.com
On Thurs, Sep 16, 2021 10:37 PM Alvaro Herrera wrote: > On 2021-Sep-16, Alvaro Herrera wrote: > > Actually, something like this might be better: > > > PublicationObjSpec: > > > | TABLE qualified_name > > { > >

RE: [BUG] Unexpected action when publishing partition tables

2021-09-16 Thread houzj.f...@fujitsu.com
On Thursday, September 16, 2021 6:05 PM Amit Kapila > > On Tuesday, September 14, 2021 10:41 PM vignesh C > > wrote: > > > On Tue, Sep 7, 2021 at 11:38 AM houzj.f...@fujitsu.com > > > wrote: > > > > Thanks for the comment. > > Attach new

RE: Logical replication keepalive flood

2021-09-16 Thread houzj.f...@fujitsu.com
On Thursday, September 16, 2021 8:36 PM Amit Kapila : > On Thu, Sep 16, 2021 at 6:29 AM houzj.f...@fujitsu.com > wrote: > > > > After applying the patch, > > I saw the same problem and can reproduce it by the following steps: > > > > 1) execute the SQLs. >

RE: Added schema level support for publication.

2021-09-21 Thread houzj.f...@fujitsu.com
On Wednesday, September 22, 2021 2:02 AM vignesh C wrote: > Attached v30 patch has the fixes for the same. Thanks for updating the patches. I have one comment. @@ -474,7 +707,75 @@ AlterPublication(ParseState *pstate, AlterPublicationStmt *stmt) ... + if (list_length(relations)) +

RE: Added schema level support for publication.

2021-09-22 Thread houzj.f...@fujitsu.com
On Wed, Sep 22, 2021 1:29 PMAmit Kapila wrote: > On Wed, Sep 22, 2021 at 8:02 AM houzj.f...@fujitsu.com > wrote: > > > > On Wednesday, September 22, 2021 2:02 AM vignesh C > wrote: > > > Attached v30 patch has the fixes for the same. > > > > Thanks fo

RE: Added schema level support for publication.

2021-09-23 Thread houzj.f...@fujitsu.com
On Thur, Sep 23, 2021 11:06 AM Greg Nancarrow wrote: > On Wed, Sep 22, 2021 at 9:33 PM houzj.f...@fujitsu.com > wrote: > > > > > > > > How do you suggest changing it? > > > > Personally, I think we'd better move the code about changing > > pu

RE: Skipping logical replication transactions on subscriber side

2021-09-24 Thread houzj.f...@fujitsu.com
On Tuesday, September 21, 2021 12:53 PM Masahiko Sawada wrote: > > I've attached the updated version patches. Please review them. Thanks for updating the patch, here are a few comments on the v14-0001 patch. 1) + hash_ctl.keysize = sizeof(Oid); +

RE: Column Filtering in Logical Replication

2021-09-24 Thread houzj.f...@fujitsu.com
From Fri, Sep 24, 2021 9:25 PM Alvaro Herrera wrote: > On 2021-Sep-23, Amit Kapila wrote: > > > Alvaro, do you have any thoughts on these proposed grammar changes? > > Yeah, I think pubobj_name remains a problem in that you don't know its return > type -- could be a String or a RangeVar, and the

RE: Added schema level support for publication.

2021-09-26 Thread houzj.f...@fujitsu.com
On Monday, September 27, 2021 12:32 PM vignesh C wrote: > On Fri, Sep 24, 2021 at 11:46 AM vignesh C wrote: > > > > Attached v33 patch has the preprocess_pubobj_list review comment fix > suggested by Alvaro at [1]. The > v33-0006-Alternate-grammar-for-ALL-TABLES-IN-SCHEMA.patch patch has > the g

RE: Added schema level support for publication.

2021-09-28 Thread houzj.f...@fujitsu.com
On Tues, Sep 28, 2021 10:46 PM vignesh C wrote: > Attached v34 patch has the changes for the same. Thanks for updating the patch. Here are a few comments. 1) + * ALL TABLES IN SCHEMA schema [[, ...] [[ -> [ 2) + /* ALTER PUBLICATION ... ADD/DROP TABLE/ALL TABLES IN SCHEMA par

RE: Added schema level support for publication.

2021-09-28 Thread houzj.f...@fujitsu.com
On Wed, Sep 29, 2021 12:34 PM Amit Kapila > On Wed, Sep 29, 2021 at 9:07 AM houzj.f...@fujitsu.com > wrote: > > > > On Tues, Sep 28, 2021 10:46 PM vignesh C wrote: > > > Attached v34 patch has the changes for the same. > > > > 3) > > + /* >

RE: Added schema level support for publication.

2021-09-29 Thread houzj.f...@fujitsu.com
On Wed, Sep 29, 2021 5:14 PM Amit Kapila wrote: > On Wed, Sep 29, 2021 at 11:59 AM houzj.f...@fujitsu.com > wrote: > > > > On Wed, Sep 29, 2021 12:34 PM Amit Kapila > > > On Wed, Sep 29, 2021 at 9:07 AM houzj.f...@fujitsu.com > > > wrote: > > > >

RE: Partition Check not updated when insert into a partition

2021-07-13 Thread houzj.f...@fujitsu.com
On Tuesday, July 13, 2021 2:52 AM Alvaro Herrera wrote: > On 2021-Jun-23, houzj.f...@fujitsu.com wrote: > > > For a multi-level partition, for example: table 'A' is partition of > > table 'B', and 'B' is also partition of table 'C'.

Avoid repeated PQfnumber() in pg_dump

2021-07-14 Thread houzj.f...@fujitsu.com
Hi, When reviewing some pg_dump related code, I found some existsing code (getTableAttrs() and dumpEnumType()) invoke PQfnumber() repeatedly which seems unnecessary. Example - for (int j = 0; j < ntups; j++) { if (j + 1 != atoi(PQgetvalu

RE: Added schema level support for publication.

2021-07-14 Thread houzj.f...@fujitsu.com
Wednesday, July 14, 2021 6:17 PM vignesh C wrote: > On Tue, Jul 13, 2021 at 12:06 PM tanghy.f...@fujitsu.com > wrote: > > > > On Monday, July 12, 2021 5:36 PM vignesh C wrote: > > > > > > Thanks for reporting this issue, this issue is fixed in the v10 > > > patch attached at [1]. > > > [1] - htt

RE: Avoid repeated PQfnumber() in pg_dump

2021-07-14 Thread houzj.f...@fujitsu.com
On July 15, 2021 5:35 AM Daniel Gustafsson wrote: > > On 14 Jul 2021, at 10:54, houzj.f...@fujitsu.com wrote: > > > Since PQfnumber() is not a cheap function, I think we'd better invoke > > PQfnumber() out of the loop like the attatched patch. > > Looks good on a

RE: Skipping logical replication transactions on subscriber side

2021-07-19 Thread houzj.f...@fujitsu.com
On July 19, 2021 2:40 PM Masahiko Sawada wrote: > I've attached the updated version patch that incorporated all comments > I got so far except for the clearing error details part I mentioned > above. After getting a consensus on those parts, I'll incorporate the > idea into the patches. Hi Sawada

RE: row filtering for logical replication

2021-07-19 Thread houzj.f...@fujitsu.com
Hi, I am interested in this feature and took a quick a look at the patch. Here are a few comments. (1) + appendStringInfo(&cmd, "%s", q); We'd better use appendStringInfoString(&cmd, q); (2) + whereclause = transformWhereClause(pstate, +

RE: [PATCH] Use optimized single-datum tuplesort in ExecSort

2021-07-21 Thread houzj.f...@fujitsu.com
From: David Rowley > On Wed, 21 Jul 2021 at 13:39, James Coleman wrote: > > Thanks for doing the math measuring how much we could impact things. > > > > I'm +lots on getting this committed as is. > > Ok good. I plan on taking a final look at the v10 patch tomorrow morning NZ > time (about 12 hou

RE: Added schema level support for publication.

2021-07-21 Thread houzj.f...@fujitsu.com
From: vignesh C Sent: Thursday, July 22, 2021 1:38 AM To: Rahila Syed Cc: Greg Nancarrow ; Tang, Haiying/唐 海英 ; Ajin Cherian ; PostgreSQL Hackers ; Bharath Rupireddy Subject: Re: Added schema level support for publication. On Wed, Jul 21, 2021 at 3:14 PM Rahila Syed mailto:rahilasye...@gm

RE: Added schema level support for publication.

2021-07-21 Thread houzj.f...@fujitsu.com
On, July 22, 2021 1:38 AM vignesh C wrote: >On Wed, Jul 21, 2021 at 3:14 PM Rahila Syed >wrote: >> More broadly, I am not clear about the behaviour of the patch when a >> publication is created to publish only certain tables, and is later altered >> to publish >>

RE: [PATCH] Use optimized single-datum tuplesort in ExecSort

2021-07-21 Thread houzj.f...@fujitsu.com
On July 22, 2021 8:38 AM David Rowley > On Thu, 22 Jul 2021 at 12:27, houzj.f...@fujitsu.com > wrote: > > The above seems can be shorter like the following ? > > > > for (;;) > > { > > slot = ExecProcNode(outerNode); > > if (

RE: Added schema level support for publication.

2021-07-21 Thread houzj.f...@fujitsu.com
On July 22, 2021 1:30 AM vignesh C wrote > > I think PubType in this case should be 't' instead of 'e'. Please have a > > look. > > Thanks for reporting this issue, this issue is fixed in the attached v13 > patch. > I have changed relation name pg_publication_schema to pg_publication_sch > so t

RE: Skipping logical replication transactions on subscriber side

2021-07-22 Thread houzj.f...@fujitsu.com
On July 20, 2021 9:26 AM Masahiko Sawada wrote: > On Mon, Jul 19, 2021 at 8:38 PM houzj.f...@fujitsu.com > wrote: > > > > On July 19, 2021 2:40 PM Masahiko Sawada > wrote: > > > I've attached the updated version patch that incorporated all > > > c

Use quick select instead of qsort to get median

2021-07-22 Thread houzj.f...@fujitsu.com
Hi, When I was writing an extension which need to get the median of an array, I tried to find if postgres provide some api that can do that. I found all the places in postgres invoke qsort() and then get the median. I was thinking can we do better by using "quick select" and is it worth it. Curre

RE: row filtering for logical replication

2021-07-26 Thread houzj.f...@fujitsu.com
On July 23, 2021 6:16 PM Amit Kapila wrote: > On Fri, Jul 23, 2021 at 2:27 PM Rahila Syed wrote: > > > > The column comparison for row filtering happens before the unchanged > > toast columns are filtered. Unchanged toast columns are filtered just > > before writing the tuple to output stream. >

RE: [bug?] Missed parallel safety checks, and wrong parallel safety

2021-07-27 Thread houzj.f...@fujitsu.com
On July 27, 2021 1:14 PM Amit Kapila > On Mon, Jul 26, 2021 at 8:33 PM Robert Haas > wrote: > > > > On Sat, Jul 24, 2021 at 5:52 AM Amit Kapila > wrote: > > > I think for the consistency argument how about allowing users to > > > specify a parallel-safety option for both partitioned and > > > no

RE: Added schema level support for publication.

2021-07-29 Thread houzj.f...@fujitsu.com
On July 28, 2021 6:44 PM vignesh C wrote: > Thanks for the patch, I have merged the changes. Attached v16 patch has the > fixes for the same. Thanks for the new version patches. Here are a few comments: 1) + /* Identify which schemas should be dropped */ + foreach(oldlc, oldschemaid

RE: Skipping logical replication transactions on subscriber side

2021-07-29 Thread houzj.f...@fujitsu.com
On July 29, 2021 1:48 PM Masahiko Sawada wrote: > > Sorry I've attached wrong ones. Reattached the correct version patches. Hi, I had some comments on the new version patches. 1) - relstate = (SubscriptionRelState *) palloc(sizeof(SubscriptionRelState)); - relstate->relid = subre

RE: Parallel Inserts (WAS: [bug?] Missed parallel safety checks..)

2021-07-30 Thread houzj.f...@fujitsu.com
On Friday, July 30, 2021 2:52 PM Greg Nancarrow wrote: > On Fri, Jul 30, 2021 at 4:02 PM Amit Kapila wrote: > > > > > Besides, I think we need a new default value about parallel dml > > > safety. Maybe 'auto' or 'null'(different from > > > safe/restricted/unsafe). Because, user is likely to alter

param 'txn' not used in function maybe_send_schema()

2021-07-30 Thread houzj.f...@fujitsu.com
Hi, When reviewing logicalreplication related patches, I noticed the function param ReorderBufferTXN *txn not used in the function maybe_send_schema(). Since this is not an external function, I think it might be better to remove the unused paramater. Best regards, Houzj 0001-remove-unused-par

RE: Parallel Inserts (WAS: [bug?] Missed parallel safety checks..)

2021-08-01 Thread houzj.f...@fujitsu.com
On August 2, 2021 2:04 PM Greg Nancarrow wrote: > On Mon, Aug 2, 2021 at 2:52 PM Amit Kapila wrote: > > > > On Fri, Jul 30, 2021 at 6:53 PM houzj.f...@fujitsu.com > > wrote: > > > > > > On Friday, July 30, 2021 2:52 PM Greg Nancarrow > wrote: > >

[BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2021-08-02 Thread houzj.f...@fujitsu.com
Hi hackers, When testing some other logical replication related patches, I found two unexpected behaviours about ALTER SUBSCRIPTION ADD/DROP PUBLICATION. (1) when I execute the following sqls[1], the data of tables that registered to 'pub' wasn't copied to the subscriber side which means tablesy

RE: Added schema level support for publication.

2021-08-03 Thread houzj.f...@fujitsu.com
On August 2, 2021 11:40 PM vignesh C wrote: > > Thanks for the comments, attached v17 patches has the fixes for the same. Thanks for the new patch, it looks good to me except one minor thing: It might be better to add the [CREATE PUBLICATION xxx FOR SCHEMA ] in tab-complete.c Best regards, hou

RE: Added schema level support for publication.

2021-08-03 Thread houzj.f...@fujitsu.com
On Tuesday, August 3, 2021 4:10 PM houzj.f...@fujitsu.com wrote: > On August 2, 2021 11:40 PM vignesh C wrote: > > > > Thanks for the comments, attached v17 patches has the fixes for the same. > > Thanks for the new patch, it looks good to me except one minor thing: > I

RE: Skipping logical replication transactions on subscriber side

2021-08-03 Thread houzj.f...@fujitsu.com
On Tuesday, August 3, 2021 2:49 PM Masahiko Sawada wrote: > > I've attached new patches that incorporate all comments I got so far. > Please review them. Hi, I had a few comments for the 0003 patch. 1). - This clause alters parameters originally set by - . See there for more -

RE: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2021-08-04 Thread houzj.f...@fujitsu.com
On Wednesday, August 4, 2021 1:47 PM Masahiko Sawada > On Mon, Aug 2, 2021 at 10:52 PM houzj.f...@fujitsu.com > wrote: > > > > > > Hi hackers, > > > > When testing some other logical replication related patches, I found > > two unexpected be

RE: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2021-08-04 Thread houzj.f...@fujitsu.com
On Wednesday, August 4, 2021 7:00 PM Masahiko Sawada wrote > On Wed, Aug 4, 2021 at 5:06 PM houzj.f...@fujitsu.com > wrote: > > > > On Wednesday, August 4, 2021 1:47 PM Masahiko Sawada > > > > > > I've not looked at the patch deeply yet but I think

RE: Parallel INSERT SELECT take 2

2021-08-05 Thread houzj.f...@fujitsu.com
Hi, Based on the discussion in another thread[1], we plan to change the design like the following: allow users to specify a parallel-safety option for both partitioned and non-partitioned relations but for non-partitioned relations if users didn't specify, it would be computed automatically? If t

RE: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2021-08-05 Thread houzj.f...@fujitsu.com
On Thursday, August 5, 2021 1:09 PM Masahiko Sawada wrote > I've reviewed v2 patch. Here are some comments: > > + if (type == ALTER_SUBSCRIPTION_SET_PUBLICATION || > + type == ALTER_SUBSCRIPTION_REFRESH) > + drop_table = !bsearch(&relid, pubrel_local_oids, >

RE: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2021-08-07 Thread houzj.f...@fujitsu.com
On Sat, Aug 7, 2021 1:36 PM Amit Kapila wrote: > On Fri, Aug 6, 2021 at 9:57 PM Japin Li wrote: > > > > > > > > Hmm yes, it cannot cover all cases. I had somehow misunderstood that > > > the subscriber knows which relations are associated with which > > > publications. Given that the subscriber d

RE: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2021-08-09 Thread houzj.f...@fujitsu.com
On Monday, August 9, 2021 11:10 AM Amit Kapila wrote: > > On Sat, Aug 7, 2021 at 6:53 PM houzj.f...@fujitsu.com > wrote: > > > > On Sat, Aug 7, 2021 1:36 PM Amit Kapila wrote: > > > On Fri, Aug 6, 2021 at 9:57 PM Japin Li wrote: > > > > > > Do

RE: Skipping logical replication transactions on subscriber side

2021-08-16 Thread houzj.f...@fujitsu.com
On Thu, Aug 12, 2021 1:53 PM Masahiko Sawada wrote: > I've attached the updated patches. FYI I've included the patch > (v8-0005) that fixes the assertion failure during shared fileset cleanup to > make > cfbot tests happy. Hi, Thanks for the new patches. I have a few comments on the v8-0001 pat

RE: Skipping logical replication transactions on subscriber side

2021-08-16 Thread houzj.f...@fujitsu.com
Monday, August 16, 2021 3:00 PM Hou, Zhijie wrote: > On Thu, Aug 12, 2021 1:53 PM Masahiko Sawada wrote: > > I've attached the updated patches. FYI I've included the patch > > (v8-0005) that fixes the assertion failure during shared fileset > > cleanup to make cfbot tests happy. > > Hi, > > Than

RE: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o

2021-08-17 Thread houzj.f...@fujitsu.com
Hi, I took a quick look at the v2 patch and noticed a typo. + * backends and render it read-only. If missing_ok is true then it will return + * NULL if file doesn not exist otherwise error. */ doesn not=> doesn't Best regards, Houzj

RE: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o

2021-08-17 Thread houzj.f...@fujitsu.com
On Wed, Aug 18, 2021 9:17 AM houzj.f...@fujitsu.com wrote: > Hi, > > I took a quick look at the v2 patch and noticed a typo. > > + * backends and render it read-only. If missing_ok is true then it will > return > + * NULL if file doesn not exist otherwise error. >

RE: Skipping logical replication transactions on subscriber side

2021-08-17 Thread houzj.f...@fujitsu.com
On Tues, Aug 17, 2021 1:01 PM Masahiko Sawada wrote: > On Mon, Aug 16, 2021 at 3:59 PM houzj.f...@fujitsu.com > wrote: > > 3) > > Do we need to invoke set_apply_error_context_xact() in the function > > apply_handle_stream_prepare() to save the xid and timestamp ? >

RE: Skipping logical replication transactions on subscriber side

2021-08-18 Thread houzj.f...@fujitsu.com
On Wed, Aug 18, 2021 2:41 PM Masahiko Sawada wrote: > > On Wed, Aug 18, 2021 at 3:15 PM Amit Kapila wrote: > > > > On Wed, Aug 18, 2021 at 10:00 AM Masahiko Sawada > > wrote: > > > > > > In addition of a code readability, there is a description in the doc > > > that mentions "Stream End" but w

RE: Skipping logical replication transactions on subscriber side

2021-08-19 Thread houzj.f...@fujitsu.com
On Thu, Aug 19, 2021 9:48 AM Masahiko Sawada wrote: > > I've attached the updated version patches that incorporated all comments I > got so far unless I'm missing something. Please review them. Thanks for the new version patches. The v9-0001 patch looks good to me and I will start to review othe

RE: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o

2021-08-22 Thread houzj.f...@fujitsu.com
On Sat, Aug 21, 2021 8:38 PM Dilip Kumar wrote: > On Wed, Aug 18, 2021 at 3:45 PM Dilip Kumar wrote: > > I was looking into this, so if we want to do that I think the outline > > will look like this > > > > - There will be a fileset.c and fileset.h files, and we will expose a > > new structure Fi

RE: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2021-08-23 Thread houzj.f...@fujitsu.com
On Mon, Aug 23, 2021 12:59 PM Amit Kapila wrote: > > On Sat, Aug 7, 2021 at 6:53 PM houzj.f...@fujitsu.com > wrote: > > > > Personally, I also think it will be better to make the behavior consistent. > > Attach the new version patch make both ADD and DROP behave the

RE: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2021-08-23 Thread houzj.f...@fujitsu.com
On Mon, Aug 23, 2021 1:18 PM Masahiko Sawada wrote: > On Mon, Aug 23, 2021 at 1:59 PM Amit Kapila > wrote: > > > > On Sat, Aug 7, 2021 at 6:53 PM houzj.f...@fujitsu.com > > wrote: > > > > > > Personally, I also think it will be better to make the behavi

RE: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2021-08-23 Thread houzj.f...@fujitsu.com
On Mon, Aug 23, 2021 8:01 PM Amit Kapila wrote: > On Mon, Aug 23, 2021 at 2:45 PM > houzj.f...@fujitsu.com wrote: > > > > On Mon, Aug 23, 2021 12:59 PM Amit Kapila wrote: > > > > > > On Sat, Aug 7, 2021 at 6:53 PM houzj.f...@fujitsu.com > > > wrote

RE: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2021-08-23 Thread houzj.f...@fujitsu.com
> -Original Message- > From: Masahiko Sawada > Sent: Tuesday, August 24, 2021 8:52 AM > > Thanks. The patch for HEAD looks good to me. Regarding the patch for PG14, I > think we need to update the comment as well: > > @@ -987,7 +986,7 @@ AlterSubscription(AlterSubscriptionStmt *stmt, b

RE: Separate out FileSet from SharedFileSet (was Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o)

2021-08-24 Thread houzj.f...@fujitsu.com
On Tuesday, August 24, 2021 6:25 PM Dilip Kumar wrote: > On Tue, Aug 24, 2021 at 12:26 PM Amit Kapila wrote: > > > > I was also thinking about the same, does it make sense to name it > > > just ""%s/%s%lu.%u.fileset"? > > Done > > > I think it is reasonable to use .fileset as proposed by you.

RE: Handle infinite recursion in logical replication setup

2022-08-16 Thread houzj.f...@fujitsu.com
On Tuesday, August 2, 2022 8:00 PM Amit Kapila wrote: > On Tue, Jul 26, 2022 at 9:07 AM Amit Kapila wrote: > > > > On Tue, Jul 26, 2022 at 7:13 AM Jonathan S. Katz > wrote: > > > > > > Thanks for the example. I agree that it is fairly simple to reproduce. > > > > > > I understand that "copy_data

RE: Handle infinite recursion in logical replication setup

2022-08-21 Thread houzj.f...@fujitsu.com
On Thursday, August 18, 2022 11:13 AM Amit Kapila wrote: > > On Wed, Aug 17, 2022 at 12:34 PM Peter Smith > wrote: > > > > On Wed, Aug 17, 2022 at 4:33 PM Amit Kapila > wrote: > > > > > > On Wed, Aug 17, 2022 at 8:48 AM houzj.f...@fujitsu.com > >

RE: Perform streaming logical transactions by background workers and parallel apply

2022-08-24 Thread houzj.f...@fujitsu.com
On Mon, Aug 22, 2022 20:50 PM Kuroda, Hayato/黒田 隼人 wrote: > Dear Wang, > > Thank you for updating the patch! Followings are comments about > v23-0001 and v23-0005. Thanks for your comments. > v23-0001 > > 01. logical-replication.sgml > > + > + When the streaming mode is parallel, the fi

RE: Perform streaming logical transactions by background workers and parallel apply

2022-08-24 Thread houzj.f...@fujitsu.com
On Thur, Aug 18, 2022 11:44 AM Peter Smith wrote: > Here are my review comments for patch v21-0001: > > Note - There are some "general" comments which will result in lots of > smaller changes. The subsequent "detailed" review comments have some > overlap with these general comments but I expect

RE: Perform streaming logical transactions by background workers and parallel apply

2022-08-29 Thread houzj.f...@fujitsu.com
On Tues, Aug 24, 2022 16:41 PM Kuroda, Hayato/黒田 隼人 wrote: > Dear Wang, > > Followings are my comments about v23-0003. Currently I do not have any > comments about 0002 and 0004. Thanks for your comments. > 09. general > > It seems that logicalrep_rel_mark_parallel_apply() is always called

RE: Data is copied twice when specifying both child and parent table in publication

2022-08-29 Thread houzj.f...@fujitsu.com
On Wednesday, August 10, 2022 7:45 AM Peter Smith wrote: > > Here are some more review comments for the HEAD_v8 patch: > > == > > 1. Commit message > > If there are two publications, one of them publish a parent table with > (publish_via_partition_root = true) and another publish child tab

RE: pg_publication_tables show dropped columns

2022-09-06 Thread houzj.f...@fujitsu.com
On Tuesday, September 6, 2022 11:13 AM Tom Lane wrote: > > Jaime Casanova writes: > > Just trying the new column/row filter on v15, I found this issue that > > could be replicated very easily. > > Bleah. Post-beta4 catversion bump, here we come. Oh, Sorry for the miss. > > This could be solv

RE: pg_publication_tables show dropped columns

2022-09-06 Thread houzj.f...@fujitsu.com
On Wednesday, September 7, 2022 6:01 AM Tom Lane wrote: > Subject: Re: pg_publication_tables show dropped columns > > "houzj.f...@fujitsu.com" writes: > > Here is the new version patch. > > I think the query plan and cost looks better after applying the patch.

When should we bump the logical replication protocol version?

2022-09-08 Thread houzj.f...@fujitsu.com
Hi, When implementing the feature to perform streaming logical transactions by background workers[1], we plan to extend the LOGICAL_REP_MSG_STREAM_ABORT message to send the additional "abort_lsn" and "abort_time" so that we can advance the origin lsn in subscriber and can restart streaming from c

RE: Perform streaming logical transactions by background workers and parallel apply

2022-09-09 Thread houzj.f...@fujitsu.com
On Friday, September 9, 2022 3:02 PM Peter Smith wrote: > > Here are my review comments for the v28-0001 patch: > > (There may be some overlap with other people's review comments and/or > some fixes already made). > Thanks for the comments. > 3. > > max_logical_replication_workers (integer)

RE: why can't a table be part of the same publication as its schema

2022-09-09 Thread houzj.f...@fujitsu.com
On Friday, September 9, 2022 9:57 PM Robert Haas wrote: > > On Fri, Sep 9, 2022 at 5:21 AM Amit Kapila wrote: > > So, why shouldn't a "FOR ALL TABLES IN SCHEMA" publication follow a > > similar behavior? Hi > > It feels like a mistake to me that there's any catalog representation at all > for

RE: why can't a table be part of the same publication as its schema

2022-09-11 Thread houzj.f...@fujitsu.com
On Monday, September 12, 2022 1:08 AM Mark Dilger wrote: > > > On Sep 10, 2022, at 4:17 PM, Robert Haas wrote: > > > >>> I don't understand why we > >>> used this ALL TABLES IN SCHEMA language. > >> > >> The conversation, as I recall, was that "ADD SCHEMA foo" would only mean > all tables in foo

RE: why can't a table be part of the same publication as its schema

2022-09-12 Thread houzj.f...@fujitsu.com
On Tuesday, September 13, 2022 12:40 PM Kyotaro Horiguchi wrote: > > At Mon, 12 Sep 2022 04:26:48 +0000, "houzj.f...@fujitsu.com" > wrote in > > On Monday, September 12, 2022 1:08 AM Mark Dilger > > wrote: > > > > > On Sep 10, 2

RE: why can't a table be part of the same publication as its schema

2022-09-13 Thread houzj.f...@fujitsu.com
On Monday, September 12, 2022 10:14 PM vignesh C wrote: > On Sat, 10 Sept 2022 at 07:32, Amit Kapila wrote: > > > > On Fri, Sep 9, 2022 at 8:48 PM Robert Haas > wrote: > > > > > > On Fri, Sep 9, 2022 at 10:29 AM houzj.f...@fujitsu.com > > > wro

RE: why can't a table be part of the same publication as its schema

2022-09-14 Thread houzj.f...@fujitsu.com
On Thursday, September 15, 2022 3:37 AM Peter Eisentraut wrote: Hi, > > On 14.09.22 07:10, houzj.f...@fujitsu.com wrote: > > After applying the patch, we support adding a table with column list > > along with the table's schema[1], and it will directly apply the > &g

RE: why can't a table be part of the same publication as its schema

2022-09-15 Thread houzj.f...@fujitsu.com
On Thursday, September 15, 2022 10:48 AM houzj.f...@fujitsu.com wrote: > > On Thursday, September 15, 2022 3:37 AM Peter Eisentraut > wrote: > > Hi, > > > > > On 14.09.22 07:10, houzj.f...@fujitsu.com wrote: > > > After applying the patch, we support addi

RE: why can't a table be part of the same publication as its schema

2022-09-16 Thread houzj.f...@fujitsu.com
On Friday, September 16, 2022 1:42 PM Amit Kapila wrote: > > On Thu, Sep 15, 2022 at 6:27 PM houzj.f...@fujitsu.com > wrote: > > > > Attach the new version patch which added suggested restriction for > > column list and merged Vignesh's patch. > >

RE: why can't a table be part of the same publication as its schema

2022-09-16 Thread houzj.f...@fujitsu.com
On Saturday, September 17, 2022 11:22 AM Amit Kapila wrote: > > On Fri, Sep 16, 2022 at 1:09 PM houzj.f...@fujitsu.com > > wrote: > > > > Attach the new version patch which addressed above comments and ran > pgident. > > I also improved some codes and docum

Fix typos in code comments

2022-09-18 Thread houzj.f...@fujitsu.com
Hi, While working on some other patches, I found serval typos(duplicate words and incorrect function name reference) in the code comments. Here is a small patch to fix them. Best regards, Hou zhijie 0001-fix-typos.patch Description: 0001-fix-typos.patch

RE: why can't a table be part of the same publication as its schema

2022-09-20 Thread houzj.f...@fujitsu.com
On Wednesday, September 21, 2022 4:06 AM Mark Dilger wrote: > > On Sep 20, 2022, at 12:36 PM, Jonathan S. Katz > wrote: > > > > This behavior exists "FOR ALL TABLES" without the "IN SCHEMA" qualifier. > This was discussed multiple times on the original thread[1]. > > Yes, nobody is debating tha

RE: Perform streaming logical transactions by background workers and parallel apply

2022-09-22 Thread houzj.f...@fujitsu.com
On Thursday, September 22, 2022 4:08 PM Kuroda, Hayato/黒田 隼人 wrote: > > Thanks for updating the patch! Followings are comments for v33-0001. Thanks for the comments. > 04. HandleParallelApplyMessages() > > ``` > + if (winfo->error_mq_handle == NULL) > + con

<    1   2   3   4   5