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

2021-11-10 Thread houzj.f...@fujitsu.com
On Friday, November 5, 2021 11:20 AM Greg Nancarrow wrote: >On Thu, Nov 4, 2021 at 7:10 PM Amit Kapila >wrote: >> >> On Thu, Nov 4, 2021 at 12:23 PM Greg Nancarrow >> wrote: >> > >> > On Thu, Nov 4, 2021 at 3:13 PM Amit Kapila >> > <

RE: [BUG]Invalidate relcache when setting REPLICA IDENTITY

2021-11-11 Thread houzj.f...@fujitsu.com
On Thur, Nov 11, 2021 12:08 PM Amit Kapila wrote: > On Thu, Nov 11, 2021 at 7:07 AM houzj.f...@fujitsu.com > wrote: > > > > On Wed, Nov 10, 2021 7:29 PM Amit Kapila wrote: > > > > > > I don't understand the purpose of idx_b in the above test case,

RE: [BUG]Invalidate relcache when setting REPLICA IDENTITY

2021-11-11 Thread houzj.f...@fujitsu.com
On Thursday, November 11, 2021 5:36 PM houzj.f...@fujitsu.com wrote: > On Thur, Nov 11, 2021 12:08 PM Amit Kapila wrote: > > On Thu, Nov 11, 2021 at 7:07 AM houzj.f...@fujitsu.com > wrote: > > > > > > On Wed, Nov 10, 2021 7:29 PM Amit Kapila > wrote: >

RE: [BUG]Invalidate relcache when setting REPLICA IDENTITY

2021-11-11 Thread houzj.f...@fujitsu.com
On Friday, November 12, 2021 8:15 AM Euler Taveira wrote: > I reviewed your patch and I think the fix could be simplified by > > if (OidIsValid(indexOid)) > CacheInvalidateRelcache(rel); > > If indexOid is valid it is a REPLICA IDENTITY INDEX. A few lines above there > is > a check for a valid

RE: [BUG]Invalidate relcache when setting REPLICA IDENTITY

2021-11-11 Thread houzj.f...@fujitsu.com
On Friday, November 12, 2021 10:46 AM I wrote: > On Friday, November 12, 2021 8:15 AM Euler Taveira > wrote: > > I reviewed your patch and I think the fix could be simplified by > > > > if (OidIsValid(indexOid)) > > CacheInvalidateRelcache(rel); > > > > If indexOid is valid it is a REPLICA IDENTIT

RE: [BUG]Invalidate relcache when setting REPLICA IDENTITY

2021-11-11 Thread houzj.f...@fujitsu.com
On Fri, Nov 12, 2021 1:33 PM Amit Kapila wrote: > On Fri, Nov 12, 2021 at 10:50 AM Amit Kapila wrote: > > But won't that generate invalidation for the rel twice in the case > > (change Replica Identity from Nothing to some index) you mentioned in > > the previous email? > > > > Oh, I see the poi

RE: [BUG]Invalidate relcache when setting REPLICA IDENTITY

2021-11-14 Thread houzj.f...@fujitsu.com
On Sat, Nov 13, 2021 6:50 PM Amit Kapila wrote: > > The patch looks mostly good to me. I have slightly tweaked the comments in > the code (as per my previous suggestion) and test. Also, I have slightly > modified the commit message. If the attached looks good to you then kindly > prepare patches

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

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 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

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

2021-11-15 Thread houzj.f...@fujitsu.com
On Friday, November 12, 2021 12:28 PM Amit Kapila wrote: > > On Thu, Nov 11, 2021 at 12:22 PM houzj.f...@fujitsu.com > wrote: > > > > On Friday, November 5, 2021 11:20 AM Greg Nancarrow > wrote: > > >On Thu, Nov 4, 2021 at 7:10 PM Amit Kapila > &l

RE: parallel vacuum comments

2021-11-15 Thread houzj.f...@fujitsu.com
On Thur, Nov 11, 2021 10:41 AM Masahiko Sawada wrote: > I've attached a draft patch that refactors parallel vacuum and separates > parallel-vacuum-related code to new file vacuumparallel.c. > After discussion, I'll divide the patch into logical chunks. Hi. I noticed few minor issues in the patch

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 > > > > wr

RE: Skipping logical replication transactions on subscriber side

2021-11-16 Thread houzj.f...@fujitsu.com
On Tues, Nov 16, 2021 2:31 PM Masahiko Sawada wrote: > Right. I've fixed this issue and attached an updated patch. Hi, Thanks for updating the patch. Here are few comments. 1) +pg_stat_reset_subscription_worker ( subid oid, relid oid ) It seems we should put '' before the comma(',

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

RE: Skipping logical replication transactions on subscriber side

2021-11-17 Thread houzj.f...@fujitsu.com
On Tuesday, November 16, 2021 2:31 PM Masahiko Sawada wrote: > Right. I've fixed this issue and attached an updated patch. > Hi, I have few comments for the testcases. 1) +my $appname = 'tap_sub'; +$node_subscriber->safe_psql( +'postgres', +"CREATE SUBSCRIPTION tap_sub CONNECTION '$pu

RE: parallel vacuum comments

2021-11-18 Thread houzj.f...@fujitsu.com
On Tues, Nov 16, 2021 1:53 PM Masahiko Sawada wrote: > I've incorporated these comments and attached an updated patch. Thanks for updating the patch. I read the latest patch and have few comments. 1) +/* + * lazy_vacuum_one_index() -- vacuum index relation. ... +IndexBulkDeleteResult * +vacu

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: row filtering for logical replication

2021-11-23 Thread houzj.f...@fujitsu.com
On Tues, Nov 23, 2021 2:27 PM vignesh C wrote: > On Thu, Nov 18, 2021 at 7:04 AM Peter Smith > wrote: > > > > PSA new set of v40* patches. > > Few comments: > 1) When a table is added to the publication, replica identity is checked. But > while modifying the publish action to include delete/upda

RE: row filtering for logical replication

2021-11-23 Thread houzj.f...@fujitsu.com
On Tues, Nov 23, 2021 6:16 PM Amit Kapila wrote: > On Tue, Nov 23, 2021 at 1:29 PM houzj.f...@fujitsu.com > wrote: > > > > On Tues, Nov 23, 2021 2:27 PM vignesh C wrote: > > > On Thu, Nov 18, 2021 at 7:04 AM Peter Smith > > > wrote: > > > > >

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: Skipping logical replication transactions on subscriber side

2021-11-25 Thread houzj.f...@fujitsu.com
On Thur, Nov 25, 2021 8:29 PM Masahiko Sawada wrote: > On Thu, Nov 25, 2021 at 1:57 PM Amit Kapila wrote: > > > > On Wed, Nov 24, 2021 at 5:14 PM Masahiko Sawada > wrote: > > > > > > Changed. I've removed first_error_time as per discussion on the > > > thread for adding xact stats. > > > > > > >

RE: row filtering for logical replication

2021-11-25 Thread houzj.f...@fujitsu.com
On Wed, Nov 24, 2021 1:46 PM Amit Kapila wrote: > On Wed, Nov 24, 2021 at 6:51 AM houzj.f...@fujitsu.com > wrote: > > > > On Tues, Nov 23, 2021 6:16 PM Amit Kapila wrote: > > > On Tue, Nov 23, 2021 at 1:29 PM houzj.f...@fujitsu.com > > > wrote: > >

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: row filtering for logical replication

2021-11-25 Thread houzj.f...@fujitsu.com
On Fri, Nov 26, 2021 11:32 AM Amit Kapila wrote: > On Thu, Nov 25, 2021 at 7:39 PM Euler Taveira wrote: > > > > On Thu, Nov 25, 2021, at 10:39 AM, houzj.f...@fujitsu.com wrote: > > > > When researching and writing a top-up patch about this. > > I found a possibl

RE: row filtering for logical replication

2021-11-28 Thread houzj.f...@fujitsu.com
On Sun, Nov 28, 2021 3:18 PM Peter Smith wrote: > On Fri, Nov 26, 2021 at 1:16 PM houzj.f...@fujitsu.com > wrote: > > > ... > > Based on this direction, I tried to write a top up POC patch(0005) which I'd > > like to share. > > > > The

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

2021-11-29 Thread houzj.f...@fujitsu.com
On Thursday, November 11, 2021 2:53 PM houzj.f...@fujitsu.com wrote: > Attach the fix patch. > 0001 fix data double publish(first issue in this thread) In another thread[1], Amit L suggested that it'd be nice to add a testcase in src/test/subscription/. So, attach a new version patch

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: row filtering for logical replication

2021-11-29 Thread houzj.f...@fujitsu.com
On Mon, Nov 29, 2021 6:11 PM Amit Kapila wrote: > On Mon, Nov 29, 2021 at 12:10 PM Greg Nancarrow > wrote: > > > > On Fri, Nov 26, 2021 at 12:40 AM houzj.f...@fujitsu.com > > wrote: > > > > > > When researching and writing a top-up patch about this. >

RE: parallel vacuum comments

2021-11-29 Thread houzj.f...@fujitsu.com
On Mon, Nov 29, 2021 11:38 AM Masahiko Sawada wrote: > > Maybe we can start with using parallel_vacuum_*. We can change them > later if there is an argument. > > I've attached an updated patch. I don't update the terminology in > vacuum that we're discussing on another thread[1]. Hi, I noticed

RE: Skipping logical replication transactions on subscriber side

2021-11-30 Thread houzj.f...@fujitsu.com
On Tues, Nov 30, 2021 9:39 PM Masahiko Sawada wrote: > On Tue, Nov 30, 2021 at 8:41 PM Masahiko Sawada > wrote: > > > > On Tue, Nov 30, 2021 at 6:28 PM Amit Kapila > wrote: > > > > > > On Mon, Nov 29, 2021 at 11:38 AM vignesh C > wrote: > > > > > > > > > > I have pushed this patch and there is

RE: Skipping logical replication transactions on subscriber side

2021-11-30 Thread houzj.f...@fujitsu.com
On Wed, Dec 1, 2021 11:22 AM Amit Kapila wrote: > On Wed, Dec 1, 2021 at 8:24 AM houzj.f...@fujitsu.com > wrote: > > > > On Tues, Nov 30, 2021 9:39 PM Masahiko Sawada > wrote: > > > > > > > > > Shouldn't we someway check that the error me

RE: Skipping logical replication transactions on subscriber side

2021-11-30 Thread houzj.f...@fujitsu.com
On Wednesday, December 1, 2021 1:23 PM Masahiko Sawada wrote: > On Wed, Dec 1, 2021 at 1:00 PM Amit Kapila wrote: > > On Wed, Dec 1, 2021 at 9:12 AM Masahiko Sawada > > wrote: > > > If so, the result from the second check_sql is unstable and it's > > > probably better to check the result only

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: > > >

RE: Rework LogicalOutputPluginWriterUpdateProgress

2023-03-02 Thread houzj.f...@fujitsu.com
On Friday, March 3, 2023 8:18 AM Peter Smith wrote: > On Wed, Mar 1, 2023 at 9:16 PM wangw.f...@fujitsu.com > wrote: > > > > On Tues, Feb 28, 2023 at 9:12 AM Peter Smith > wrote: > > > Here are some comments for the v2-0001 patch. > > > > > > (I haven't looked at the v3 that was posted overnight

RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-02 Thread houzj.f...@fujitsu.com
On Thursday, March 2, 2023 11:23 PM Önder Kalacı wrote: > Both the patches are numbered 0001. It would be better to number them > as 0001 and 0002. > > Alright, attached v27_0001_use_index_on_subs_when_pub_rep_ident_full.patch > and > v27_0002_use_index_on_subs_when_pub_rep_ident_full.patch.

RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-07 Thread houzj.f...@fujitsu.com
On Tuesday, March 7, 2023 9:47 PM Önder Kalacı wrote: Hi, > > > Let me give an example to demonstrate why I thought something is fishy > > > here: > > > > > > Imagine rel has a (non-default) REPLICA IDENTITY with Oid=. > > > Imagine the same rel has a PRIMARY KEY with Oid=. > > > > >

RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-07 Thread houzj.f...@fujitsu.com
On Wednesday, March 8, 2023 2:51 PM houzj.f...@fujitsu.com wrote: > > On Tuesday, March 7, 2023 9:47 PM Önder Kalacı > wrote: > > Hi, > > > > > Let me give an example to demonstrate why I thought something is fishy > here: > > > > > > > &

RE: Support logical replication of DDLs

2023-03-09 Thread houzj.f...@fujitsu.com
On Thur, Mar 9, 2023 10:27 AM Wang, Wei/王 威 > On Mon, Mar 6, 2023 18:17 PM Wang, Wei/王 威 > wrote: > > On Mon, Mar 6, 2023 14:34 AM Ajin Cherian wrote: > > > Changes are in patch 1 and patch 2 > > > > Thanks for updating the patch set. > > > > Here are some comments: > > Here are some more comme

RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-13 Thread houzj.f...@fujitsu.com
On Monday, March 13, 2023 2:23 PM Önder Kalacı wrote: Hi, > > > > > > > > > Reading [1], I think I can follow what you suggest. So, basically, > > > if the leftmost column is not filtered, we have the following: > > > > > >> but the entire index would have to be scanned, so in most cases the >

Simplify some codes in pgoutput

2023-03-15 Thread houzj.f...@fujitsu.com
Hi, I noticed that there are some duplicated codes in pgoutput_change() function which can be simplified, and here is an attempt to do that. Best Regards, Hou Zhijie 0001-simplify-the-code-in-pgoutput_change.patch Description: 0001-simplify-the-code-in-pgoutput_change.patch

RE: Allow logical replication to copy tables in binary format

2023-03-15 Thread houzj.f...@fujitsu.com
Hi, Thanks for updating the patch, I think it is a useful feature. I looked at the v15 patch and the patch looks mostly good to me. Here are few comments: 1. + { + appendStringInfo(&cmd, " WITH (FORMAT binary)"); We could use appendStringInfoString here. 2. +# It should fa

RE: Simplify some codes in pgoutput

2023-03-20 Thread houzj.f...@fujitsu.com
On Thursday, March 16, 2023 12:30 PM Amit Kapila wrote: > > On Wed, Mar 15, 2023 at 2:00 PM houzj.f...@fujitsu.com > wrote: > > > > I noticed that there are some duplicated codes in pgoutput_change() > function > > which can be simplified, and here is an at

RE: Simplify some codes in pgoutput

2023-03-20 Thread houzj.f...@fujitsu.com
On Friday, March 17, 2023 11:49 AM Peter Smith wrote: > > On Wed, Mar 15, 2023 at 7:30 PM houzj.f...@fujitsu.com > wrote: > > > > Hi, > > > > I noticed that there are some duplicated codes in pgoutput_change() > > function which can be simplified, and her

RE: Initial Schema Sync for Logical Replication

2023-03-22 Thread houzj.f...@fujitsu.com
On Wednesday, March 22, 2023 1:16 PM Amit Kapila wrote: > > On Wed, Mar 22, 2023 at 8:29 AM Masahiko Sawada > wrote: > > > > On Tue, Mar 21, 2023 at 8:18 PM Amit Kapila > wrote: > > > > > > On Tue, Mar 21, 2023 at 7:32 AM Euler Taveira wrote: > > > > > > > You should > > > > exclude them remo

RE: Simplify some codes in pgoutput

2023-03-22 Thread houzj.f...@fujitsu.com
On Monday, March 20, 2023 5:20 pmhouzj.f...@fujitsu.com wrote: > > On Thursday, March 16, 2023 12:30 PM Amit Kapila > wrote: > > > > > On Wed, Mar 15, 2023 at 2:00 PM houzj.f...@fujitsu.com > > wrote: > > > > > > I noticed that there are some du

RE: Initial Schema Sync for Logical Replication

2023-03-24 Thread houzj.f...@fujitsu.com
On Friday, March 24, 2023 12:02 AM Euler Taveira wrote: > > On Thu, Mar 23, 2023, at 8:44 AM, Amit Kapila wrote: > > On Thu, Mar 23, 2023 at 2:48 AM Euler Taveira > > wrote: > > > > > > On Tue, Mar 21, 2023, at 8:18 AM, Amit Kapila wrote: > > > > > > Now, how do we av

RE: Initial Schema Sync for Logical Replication

2023-03-24 Thread houzj.f...@fujitsu.com
On Friday, March 24, 2023 11:01 PM Euler Taveira wrote: Hi, > On Fri, Mar 24, 2023, at 8:57 AM, mailto:houzj.f...@fujitsu.com wrote: > > First, I think the current publisher doesn't know the version number of > > client(subscriber) so we need to check the feasibility of same. Also, having > > c

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

2022-12-13 Thread houzj.f...@fujitsu.com
On Tue, Dec 13, 2022 7:06 AM Peter Smith wrote: > Some minor review comments for v58-0001 Thanks for your comments. > == > > .../replication/logical/applyparallelworker.c > > 1. pa_can_start > > + /* > + * Don't start a new parallel worker if user has set skiplsn as it's > + * possible th

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

2022-12-13 Thread houzj.f...@fujitsu.com
On Tuesday, December 13, 2022 11:25 PM Masahiko Sawada wrote: > > On Sun, Dec 11, 2022 at 8:45 PM houzj.f...@fujitsu.com > wrote: > > > > On Friday, December 9, 2022 3:14 PM Amit Kapila > wrote: > > > > > > On Thu, Dec 8, 2022 at 12

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

2022-12-16 Thread houzj.f...@fujitsu.com
On Friday, December 16, 2022 3:08 PM Masahiko Sawada wrote: > > >Here are some minor comments: Thanks for the comments! > --- > +pa_has_spooled_message_pending() > +{ > + PartialFileSetState fileset_state; > + > + fileset_state = pa_get_fileset_state(); > + > + if (fileset_s

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

2022-12-20 Thread houzj.f...@fujitsu.com
On Monday, December 19, 2022 8:47 PMs Amit Kapila : > > On Sat, Dec 17, 2022 at 7:34 PM houzj.f...@fujitsu.com > wrote: > > > > Agreed. I have addressed all the comments and did some cosmetic changes. > > Attach the new version patch set. > > > > F

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

2023-01-05 Thread houzj.f...@fujitsu.com
On Thursday, January 5, 2023 4:22 PM Dilip Kumar wrote: > > On Thu, Jan 5, 2023 at 9:07 AM houzj.f...@fujitsu.com > wrote: > > > > On Wednesday, January 4, 2023 9:29 PM Dilip Kumar > wrote: > > > > I think this looks good to me. > > > > Tha

Notify downstream to discard the streamed transaction which was aborted due to crash.

2023-01-05 Thread houzj.f...@fujitsu.com
Hi, When developing another feature, I find an existing bug which was reported from Dilip[1]. Currently, it's possible that we only send a streaming block without sending a end of stream message(stream abort) when decoding and streaming a transaction that was aborted due to crash because we migh

RE: Notify downstream to discard the streamed transaction which was aborted due to crash.

2023-01-05 Thread houzj.f...@fujitsu.com
On Friday, January 6, 2023 1:15 PM Amit Kapila wrote: > > On Fri, Jan 6, 2023 at 9:25 AM houzj.f...@fujitsu.com > wrote: > > > > > > To fix it, One idea is to send a stream abort message when we are > > cleaning up crashed transaction on publisher(e.g. in >

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

2023-01-09 Thread houzj.f...@fujitsu.com
On Monday, January 9, 2023 5:32 PM Shinoda, Noriyoshi (PN Japan FSIP) wrote: > > Hi, Thanks for the great new feature. > > Applied patches include adding wait events LogicalParallelApplyMain, > LogicalParallelApplyStateChange. > However, it seems that monitoring.sgml only contains descriptions

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

2023-01-09 Thread houzj.f...@fujitsu.com
On Monday, January 9, 2023 4:51 PM Amit Kapila wrote: > > On Sun, Jan 8, 2023 at 11:32 AM houzj.f...@fujitsu.com > wrote: > > > > On Sunday, January 8, 2023 11:59 AM houzj.f...@fujitsu.com > wrote: > > > Attach the updated patch set. > > > > Sorry

RE: releasing ParallelApplyTxnHash when pa_launch_parallel_worker returns NULL

2023-01-10 Thread houzj.f...@fujitsu.com
On Wednesday, January 11, 2023 1:25 AM Ted Yu wrote: > I was reading src/backend/replication/logical/applyparallelworker.c . > In `pa_allocate_worker`, when pa_launch_parallel_worker returns NULL, I think > the `ParallelApplyTxnHash` should be released. Thanks for reporting. ParallelApplyTxnHa

RE: releasing ParallelApplyTxnHash when pa_launch_parallel_worker returns NULL

2023-01-10 Thread houzj.f...@fujitsu.com
On Wednesday, January 11, 2023 10:21 AM Ted Yu wrote: > /* First time through, initialize parallel apply worker state > hashtable. */ > if (!ParallelApplyTxnHash) > > I think it would be better if `ParallelApplyTxnHash` is created by the first > successful parallel apply worker.

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

2023-01-10 Thread houzj.f...@fujitsu.com
On Tuesday, January 10, 2023 7:48 PM Dilip Kumar wrote: > > On Tue, Jan 10, 2023 at 10:26 AM houzj.f...@fujitsu.com > wrote: > > > > On Monday, January 9, 2023 4:51 PM Amit Kapila > wrote: > > > > > > On Sun, Jan 8, 2023 at 11:32 AM houzj.f...@fu

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

2023-01-12 Thread houzj.f...@fujitsu.com
On Thursday, January 12, 2023 7:08 PM Amit Kapila wrote: > > On Thu, Jan 12, 2023 at 4:21 PM shveta malik wrote: > > > > On Thu, Jan 12, 2023 at 10:34 AM Amit Kapila > wrote: > > > > > > On Thu, Jan 12, 2023 at 9:54 AM Peter Smith > wrote: > > > > > > > > > > > > doc/src/sgml/monitoring.sgml

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

2023-01-12 Thread houzj.f...@fujitsu.com
On Thursday, January 12, 2023 12:24 PM Peter Smith wrote: > > Hi, here are some review comments for patch v78-0001. Thanks for your comments. > == > > General > > 1. (terminology) > > AFAIK everywhere until now we’ve been referring everywhere > (docs/comments/code) to the parent apply w

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

2023-01-13 Thread houzj.f...@fujitsu.com
On Friday, January 13, 2023 2:20 PM Peter Smith wrote: > > Here are some review comments for patch v79-0002. Thanks for your comments. > == > > General > > 1. > > I saw that earlier in this thread Hou-san [1] and Amit [2] also seemed to say > there is not much point for this patch. > >

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

2023-01-13 Thread houzj.f...@fujitsu.com
On Friday, January 13, 2023 1:02 PM Masahiko Sawada wrote: > > On Fri, Jan 13, 2023 at 1:28 PM Amit Kapila wrote: > > > > On Fri, Jan 13, 2023 at 9:06 AM Amit Kapila > wrote: > > > > > > On Fri, Jan 13, 2023 at 7:56 AM Peter Smith > wrote: > > > > > > > > > > > > > > > 3. > > > > > > > >

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

2023-01-13 Thread houzj.f...@fujitsu.com
On Friday, January 13, 2023 1:43 PM Masahiko Sawada wrote: > On Thu, Jan 12, 2023 at 9:34 PM houzj.f...@fujitsu.com > wrote: > > > > On Thursday, January 12, 2023 7:08 PM Amit Kapila > wrote: > > > > > > On Thu, Jan 12, 2023 at 4:21 PM shveta malik

BF animal malleefowl reported an failure in 001_password.pl

2023-01-13 Thread houzj.f...@fujitsu.com
Hi, I noticed one BF failure[1] when monitoring the BF for some other commit. # Failed test 'authentication success for method password, connstr user=scram_role: log matches' # at t/001_password.pl line 120. # '2023-01-13 07:33:46.741 EST [243628:5] LOG: received SIGHUP,

RE: logrep stuck with 'ERROR: int2vector has too many elements'

2023-01-15 Thread houzj.f...@fujitsu.com
On Sunday, January 15, 2023 5:35 PM Erik Rijkers wrote: > > I can't find the exact circumstances that cause it but it has something to do > with > many columns (or adding many columns) in combination with perhaps > generated columns. > > This replication test, in a slightly different form, used

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

2023-01-16 Thread houzj.f...@fujitsu.com
On Tuesday, January 17, 2023 5:43 AM Peter Smith wrote: > > On Mon, Jan 16, 2023 at 5:41 PM Amit Kapila > wrote: > > > > On Mon, Jan 16, 2023 at 10:24 AM Peter Smith > wrote: > > > > > > 2. > > > > > > /* > > > + * Return the pid of the leader apply worker if the given pid is > > > +the pid of

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

2023-01-16 Thread houzj.f...@fujitsu.com
On Tuesday, January 17, 2023 11:32 AM Peter Smith wrote: > > On Tue, Jan 17, 2023 at 1:21 PM houzj.f...@fujitsu.com > wrote: > > > > On Tuesday, January 17, 2023 5:43 AM Peter Smith > wrote: > > > > > > On Mon, Jan 16, 2023 at 5:41 PM Amit Kapila >

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

2023-01-16 Thread houzj.f...@fujitsu.com
On Tuesday, January 17, 2023 12:55 PM Amit Kapila wrote: > > On Tue, Jan 17, 2023 at 8:59 AM Amit Kapila wrote: > > > > On Tue, Jan 17, 2023 at 8:35 AM Masahiko Sawada > wrote: > > > > > > On Mon, Jan 16, 2023 at 3:19 PM Amit Kapila > wrote: > > > > > > > > Okay, I have added the comments in

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

2023-01-17 Thread houzj.f...@fujitsu.com
On Tuesday, January 17, 2023 2:46 PM Masahiko Sawada wrote: > > On Tue, Jan 17, 2023 at 12:37 PM houzj.f...@fujitsu.com > wrote: > > Attach the new version 0001 patch which addressed all other comments. > > > > Thank you for updating the patch. Here is one comme

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

2023-01-17 Thread houzj.f...@fujitsu.com
On Tuesday, January 17, 2023 12:34 PM shveta malik wrote: > > On Tue, Jan 17, 2023 at 9:07 AM houzj.f...@fujitsu.com > wrote: > > > > On Tuesday, January 17, 2023 11:32 AM Peter Smith > wrote: > > > OK. I didn't know there was another header convention t

RE: Support logical replication of DDLs

2023-03-27 Thread houzj.f...@fujitsu.com
On Monday, March 27, 2023 8:08 PM Amit Kapila wrote: > On Mon, Mar 27, 2023 at 12:07 PM Amit Kapila > wrote: > > > > On Mon, Mar 27, 2023 at 2:52 AM Tom Lane wrote: > > > > > > > > I suggest taking a couple of steps back from the minutiae of the > > > patch, and spending some hard effort thinkin

RE: Support logical replication of DDLs

2023-03-27 Thread houzj.f...@fujitsu.com
On Tuesday, March 28, 2023 1:41 PM Amit Kapila wrote: > > On Mon, Mar 27, 2023 at 5:37 PM Amit Kapila > wrote: > > > > On Mon, Mar 27, 2023 at 12:07 PM Amit Kapila > wrote: > > > > > > On Mon, Mar 27, 2023 at 2:52 AM Tom Lane wrote: > > > > > > > > > > > I suggest taking a couple of steps back

RE: Simplify some codes in pgoutput

2023-03-29 Thread houzj.f...@fujitsu.com
On Thursday, March 30, 2023 9:15 AM Peter Smith wrote: > > Hi Hou-san, > > I tried to compare the logic of patch v3-0001 versus the original HEAD code. > > IMO this patch logic is not exactly the same as before -- there are > some subtle differences. I am not sure if these differences represent

RE: Non-superuser subscription owners

2023-03-30 Thread houzj.f...@fujitsu.com
On Friday, March 31, 2023 12:05 AM Robert Haas wrote: Hi, > > On Tue, Mar 28, 2023 at 1:52 PM Jeff Davis wrote: > > On Fri, 2023-03-24 at 00:17 -0700, Jeff Davis wrote: > > > The other patch you posted seems like it makes a lot of progress in > > > that direction, and I think that should go in

RE: Non-superuser subscription owners

2023-03-31 Thread houzj.f...@fujitsu.com
On Saturday, April 1, 2023 4:00 AM Robert Haas Hi, > > On Thu, Mar 30, 2023 at 9:49 PM houzj.f...@fujitsu.com > wrote: > > It looks like the super user check is out of a transaction, I haven't > > checked why it only failed on one BF animal, but it seems we can

RE: Support logical replication of DDLs

2023-04-03 Thread houzj.f...@fujitsu.com
On Friday, March 31, 2023 6:31 AM Peter Smith wrote: Hi, > > It seems that lately, the patch attachments are lacking version numbers. It > causes unnecessary confusion. For example, I sometimes fetch patches from > this thread locally to "diff" them with previous patches to get a rough > overv

RE: logical replication empty transactions

2022-03-24 Thread houzj.f...@fujitsu.com
On Thursday, March 24, 2022 11:19 AM houzj.f...@fujitsu.com wrote: > On Tuesday, March 22, 2022 7:50 PM Amit Kapila > wrote: > > On Tue, Mar 22, 2022 at 7:25 AM houzj.f...@fujitsu.com > > wrote: > > > > > > > On Monday, March 21, 2022 6:01 PM Amit Kapila

Fix typo in standby.c

2022-03-24 Thread houzj.f...@fujitsu.com
Hi, I noticed a possible typo in standby.c: --- * The definitions of RunningTransactionsData and xl_xact_running_xacts are * similar. We keep them separate because xl_xact_running_xacts is a --- It seems "xl_xact_running_xacts" should be "xl_running_xacts". Best regards, Hou zhijie 0001-fi

RE: logical replication empty transactions

2022-03-25 Thread houzj.f...@fujitsu.com
On Friday, March 25, 2022 8:31 AM houzj.f...@fujitsu.com wrote: > On Thursday, March 24, 2022 11:19 AM houzj.f...@fujitsu.com wrote: > > On Tuesday, March 22, 2022 7:50 PM Amit Kapila > > > wrote: > > > On Tue, Mar 22, 2022 at 7:25 AM houzj.f...@fujitsu.com > &g

RE: logical replication empty transactions

2022-03-28 Thread houzj.f...@fujitsu.com
On Monday, March 28, 2022 3:08 PM Amit Kapila wrote: > > On Fri, Mar 25, 2022 at 12:50 PM houzj.f...@fujitsu.com > wrote: > > > > Attach the new version patch with this change. > > > > Few comments: Thanks for the comments. > = > 1. I

RE: logical replication empty transactions

2022-03-29 Thread houzj.f...@fujitsu.com
On Tuesday, March 29, 2022 3:20 PM Masahiko Sawada wrote: > > Some comments: Thanks for the comments! > > + if (skipped_xact && > + SyncRepRequested() && > + ((volatile WalSndCtlData *) > WalSndCtl)->sync_standbys_defined) > + { > + WalSnd

RE: logical replication empty transactions

2022-03-29 Thread houzj.f...@fujitsu.com
On Tuesday, March 29, 2022 5:12 PM Amit Kapila wrote: > > On Tue, Mar 29, 2022 at 2:05 PM houzj.f...@fujitsu.com > wrote: > > > > Attach the new version patch which addressed the above comments and > > slightly adjusted some code comments. > > > >

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 > > > &g

RE: row filtering for logical replication

2022-04-11 Thread houzj.f...@fujitsu.com
On Tuesday, April 12, 2022 8:40 AM Peter Smith wrote: > > FYI, I was playing with row filters and partitions recently, and while doing > something a bit unusual I received a cache leak warning. > > Below are the steps to reproduce it: > > > test_pub=# CREATE TABLE parent(a int primary key) PAR

RE: PG DOCS - logical replication filtering

2022-04-13 Thread houzj.f...@fujitsu.com
On Wednesday, April 13, 2022 11:25 AM Peter Smith wrote: > > PSA patch v10 which addresses the remaining review comments from Euler [1] Thanks for the patch, it looks good to me. Best regards, Hou zj

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

2022-04-13 Thread houzj.f...@fujitsu.com
On Friday, April 8, 2022 5:14 PM houzj.f...@fujitsu.com wrote: > On Wednesday, April 6, 2022 1:20 PM Amit Kapila > wrote: > > > In this email, I would like to discuss allowing streaming logical > > transactions (large in-progress transactions) by background workers >

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 RelationSyncCa

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

2022-04-19 Thread houzj.f...@fujitsu.com
> -Original Message- > From: Wang, Wei/王 威 On Thursday, April 7, 2022 11:08 AM > > On Thur, Mar 10, 2021 at 10:08 AM houzj.f...@fujitsu.com wrote: > > Hi, > > > > When reviewing some logical replication related features. I noticed another > >

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

2022-04-20 Thread houzj.f...@fujitsu.com
On Tuesday, April 19, 2022 2:58 PM Amit Kapila wrote: > > On Thu, Apr 14, 2022 at 9:12 AM houzj.f...@fujitsu.com > wrote: > > > > On Friday, April 8, 2022 5:14 PM houzj.f...@fujitsu.com > wrote: > > > > Attach a new version patch which improved the e

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

2022-04-20 Thread houzj.f...@fujitsu.com
On Wednesday, April 20, 2022 4:57 PM houzj.f...@fujitsu.com wrote: > > On Tuesday, April 19, 2022 2:58 PM Amit Kapila > wrote: > > > > On Thu, Apr 14, 2022 at 9:12 AM houzj.f...@fujitsu.com > > wrote: > > > > > > On Friday, April 8, 2

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

2022-04-25 Thread houzj.f...@fujitsu.com
On Friday, April 22, 2022 12:12 PM Peter Smith wrote: > > Hello Hou-san. Here are my review comments for v4-0001. Sorry, there > are so many of them (it is a big patch); some are trivial, and others > you might easily dismiss due to my misunderstanding of the code. But > hopefully, there are at l

RE: bogus: logical replication rows/cols combinations

2022-04-27 Thread houzj.f...@fujitsu.com
On Wednesday, April 27, 2022 12:56 PM From: Amit Kapila wrote: > On Tue, Apr 26, 2022 at 4:00 AM Tomas Vondra > wrote: > > > > On 4/25/22 17:48, Alvaro Herrera wrote: > > > > > The desired result on subscriber is: > > > > > > table uno; > > > a │ b │ c > > > ┼───┼─── > > > 1 │ 2 │ > > >

RE: Logical replication timeout problem

2022-04-28 Thread houzj.f...@fujitsu.com
On Wednesday, April 20, 2022 3:21 PM Masahiko Sawada wrote: > > BTW the changes in > REL_14_v1-0001-Fix-the-logical-replication-timeout-during-large-.patch, > adding end_xact to LogicalDecodingContext, seems good to me and it > might be better than the approach of v17 patch from plugin developer

RE: row filtering for logical replication

2022-01-17 Thread houzj.f...@fujitsu.com
On Mon, Jan 17, 2022 12:34 PM Peter Smith wrote: > > Here are some review comments for v65-0001 (review of updates since > v64-0001) Thanks for the comments! > ~~~ > > 1. src/include/commands/publicationcmds.h - rename func > > +extern bool contain_invalid_rfcolumn(Oid pubid, Relation relatio

RE: row filtering for logical replication

2022-01-17 Thread houzj.f...@fujitsu.com
On Mon, Jan 17, 2022 12:35 PM Greg Nancarrow wrote: > > On Sat, Jan 15, 2022 at 5:30 PM houzj.f...@fujitsu.com > wrote: > > > > Attach the V65 patch set which addressed the above comments and Peter's > comments[1]. > > I also fixed some typos and remove

RE: row filtering for logical replication

2022-01-18 Thread houzj.f...@fujitsu.com
On Tues, Jan 18, 2022 9:27 AM Peter Smith wrote: > Here are some review comments for v66-0001 (review of updates since > v65-0001) Thanks for the comments! > ~~~ > > 1. src/backend/catalog/pg_publication.c - GetTopMostAncestorInPublication > > @@ -276,17 +276,45 @@ GetPubPartitionOptionRelatio

RE: row filtering for logical replication

2022-01-20 Thread houzj.f...@fujitsu.com
On Thursday, January 20, 2022 9:14 PM Alvaro Herrera wrote: > > I was skimming this and the changes in CheckCmdReplicaIdentity caught my > attention. "Is this code running at the publisher side or the subscriber > side?" I > wondered -- because the new error messages being added look intended

RE: row filtering for logical replication

2022-01-20 Thread houzj.f...@fujitsu.com
On Thur, Jan 20, 2022 10:26 PM Alvaro Herrera wrote: > > On 2022-Jan-20, Amit Kapila wrote: > > > It returns an invalid column referenced in an RF if any but if not > > then it helps to form pubactions which is anyway required at a later > > point in the caller. The idea is that when we are alre

<    1   2   3   4   5   >