RE: Support tab completion for upper character inputs in psql

2022-07-22 Thread tanghy.f...@fujitsu.com
On Monday, January 31, 2022 3:35 AM, Tom Lane wrote: > "tanghy.f...@fujitsu.com" writes: > > Thanks for your V16 patch, I tested it. > > The results LGTM. > > Pushed, thanks for looking. I think 02b8048 forgot to free some used memory. Attached a tiny patch

RE: Memory leak fix in psql

2022-07-20 Thread tanghy.f...@fujitsu.com
> On Wed, Jul 20, 2022 at 12:51:24PM +0800, Junwang Zhao wrote: > > Though the patch looks good, I myself think the patch should be edited > > and submitted by Tang > > It's easy to attach a fixed patch based on the comments of the thread, > > but coins should be > > given to Tang since he is the

RE: Memory leak fix in psql

2022-07-20 Thread tanghy.f...@fujitsu.com
On Wednesday, July 20, 2022 12:52 PM, Michael Paquier wrote: > What about the argument of upthread where we could use a goto in > functions where there are multiple pattern validation checks? Per se > v4 attached. Thanks for your kindly remind and modification. I checked v4 patch, it looks

RE: Memory leak fix in psql

2022-07-19 Thread tanghy.f...@fujitsu.com
On Tuesday, July 19, 2022 7:41 PM, Japin Li wrote: > After looking around, I found psql/describe.c also has some memory > leaks, > attached a patch to fix these leaks. Thanks for your check and improvement. Your fix LGTM so please allow me to merge it in the attached patch. Based on your

Memory leak fix in psql

2022-07-19 Thread tanghy.f...@fujitsu.com
Hi I think there is a newly introduced memory leak in your patch d2d3547. Try to fix it in the attached patch. Kindly to have a check. Regards, Tang v1-0001-fix-the-memory-leak-in-validateSQLNamePattern.patch Description: v1-0001-fix-the-memory-leak-in-validateSQLNamePattern.patch

RE: Design of pg_stat_subscription_workers vs pgstats

2022-02-27 Thread tanghy.f...@fujitsu.com
On Mon, Feb 28, 2022 12:32 PM Amit Kapila wrote: > > On Mon, Feb 28, 2022 at 8:17 AM Masahiko Sawada > wrote: > > > > On Mon, Feb 28, 2022 at 11:33 AM Amit Kapila > wrote: > > > > > > > > > > > (2) doc/src/sgml/monitoring.sgml > > > > > > > > +Resets statistics for a single

RE: Design of pg_stat_subscription_workers vs pgstats

2022-02-23 Thread tanghy.f...@fujitsu.com
On Thu, Feb 24, 2022 9:33 AM Masahiko Sawada wrote: > > Thank you for the comments! I've attached the latest version patch > that incorporated all comments I got so far. The primary change from > the previous version is that the subscription statistics live globally > rather than per-database. >

RE: Optionally automatically disable logical replication subscriptions on error

2022-02-23 Thread tanghy.f...@fujitsu.com
Hi Osumi-san, I have a comment on v21 patch. I wonder if we really need subscription s2 in 028_disable_on_error.pl. I think for subscription s2, we only tested some normal cases(which could be tested with s1), and didn't test any error case, which means it wouldn't be automatically disabled.

RE: Design of pg_stat_subscription_workers vs pgstats

2022-02-22 Thread tanghy.f...@fujitsu.com
On Tue, Feb 22, 2022 1:45 PM Masahiko Sawada wrote: > > I've attached a patch that changes pg_stat_subscription_workers view. > It removes non-cumulative values such as error details such as > error-XID and the error message from the view, and consequently the > view now has only cumulative

RE: Failed transaction statistics to measure the logical replication progress

2022-02-21 Thread tanghy.f...@fujitsu.com
On Mon, Feb 21, 2022 11:46 AM osumi.takami...@fujitsu.com wrote: > > On Saturday, February 19, 2022 12:00 AM osumi.takami...@fujitsu.com > wrote: > > On Friday, February 18, 2022 3:34 PM Tang, Haiying/唐 海英 > > wrote: > > > On Wed, Jan 12, 2022 8:35 PM osumi.takami...@fujitsu.com > > > wrote:

RE: Failed transaction statistics to measure the logical replication progress

2022-02-17 Thread tanghy.f...@fujitsu.com
On Wed, Jan 12, 2022 8:35 PM osumi.takami...@fujitsu.com wrote: > > The attached v21 has a couple of other minor updates > like a modification of error message text. > > Thanks for updating the patch. Here are some comments. 1) I saw the following description about

RE: [BUG]Update Toast data failure in logical replication

2022-02-10 Thread tanghy.f...@fujitsu.com
On Thu, Feb 10, 2022 9:34 PM Amit Kapila wrote: > > On Mon, Feb 7, 2022 at 1:27 PM Dilip Kumar wrote: > > > > On Mon, Feb 7, 2022 at 12:25 PM Amit Kapila > wrote: > > > > > > Attached please find the modified patches. > > > > I have looked into the latest modification and back branch patches

RE: [BUG]Update Toast data failure in logical replication

2022-02-08 Thread tanghy.f...@fujitsu.com
On Tue, Feb 8, 2022 3:18 AM Andres Freund wrote: > > On 2022-02-07 08:44:00 +0530, Amit Kapila wrote: > > Right, and it is getting changed. We are just printing the first 200 > > characters (by using SQL [1]) from the decoded tuple so what is shown > > in the results is the initial 200 bytes. >

RE: [BUG]Update Toast data failure in logical replication

2022-02-08 Thread tanghy.f...@fujitsu.com
On Mon, Feb 7, 2022 2:55 PM Amit Kapila wrote: > > On Sat, Feb 5, 2022 at 6:10 AM Amit Kapila wrote: > > > > On Fri, Feb 4, 2022 at 9:06 PM Alvaro Herrera > > wrote: > > > > > > > > > I have some suggestions > > > on the comments and docs though. > > > > > > > Thanks, your suggestions look

RE: Support tab completion for upper character inputs in psql

2022-01-29 Thread tanghy.f...@fujitsu.com
On Saturday, January 29, 2022 7:17 AM, Tom Lane wrote: > Sigh ... per the cfbot, this was already blindsided by 95787e849. > As I said, I don't want to sit on this for very long. Thanks for your V16 patch, I tested it. The results LGTM. Regards, Tang

RE: Support tab completion for upper character inputs in psql

2022-01-29 Thread tanghy.f...@fujitsu.com
On Saturday, January 29, 2022 1:03 AM, Tom Lane wrote: > "tanghy.f...@fujitsu.com" writes: > > I did some tests on it and here are something cases I feel we need to > > confirm > > whether they are suitable. > > > 1) postgres=# create table atest(id

RE: Support tab completion for upper character inputs in psql

2022-01-27 Thread tanghy.f...@fujitsu.com
On Friday, January 28, 2022 5:24 AM, Tom Lane wrote: > Here's a fleshed-out patch series for this idea. Thanks for you patch. I did some tests on it and here are something cases I feel we need to confirm whether they are suitable. 1) postgres=# create table atest(id int, "iD" int, "ID" int);

RE: Support tab completion for upper character inputs in psql

2022-01-25 Thread tanghy.f...@fujitsu.com
On Tuesday, January 25, 2022 6:44 PM, Julien Rouhaud wrote: > Thanks for updating the patch. When you do so, please check and update the > commitfest entry accordingly to make sure that people knows it's ready for > review. I'm switching the entry to Needs Review. > Thanks for your reminder.

RE: Support tab completion for upper character inputs in psql

2022-01-24 Thread tanghy.f...@fujitsu.com
On Monday, January 24, 2022 6:36 PM, Peter Eisentraut wrote: > The way your patch works now is that the case-insensitive behavior you > are implementing only works if the client encoding is a single-byte > encoding. This isn't what downcase_identifier() does; > downcase_identifier() always

RE: Skipping logical replication transactions on subscriber side

2022-01-23 Thread tanghy.f...@fujitsu.com
On Fri, Jan 21, 2022 7:55 PM Amit Kapila wrote: > > 2. > +stop_skipping_changes(bool clear_subskipxid, XLogRecPtr origin_lsn, > + TimestampTz origin_timestamp) > +{ > + Assert(is_skipping_changes()); > + > + ereport(LOG, > + (errmsg("done skipping logical replication transaction %u", > +

RE: row filtering for logical replication

2022-01-20 Thread tanghy.f...@fujitsu.com
On Thu, Jan 20, 2022 9:13 AM houzj.f...@fujitsu.com wrote: > Attach the V68 patch set which addressed the above comments and changes. > The version patch also fix the error message mentioned by Greg[1] > I saw a problem about this patch, which is related to Replica Identity check. For

RE: Support tab completion for upper character inputs in psql

2022-01-19 Thread tanghy.f...@fujitsu.com
On Sunday, January 16, 2022 3:51 AM, Tom Lane said: > Peter Eisentraut writes: > > The rest of the patch seems ok in principle, since AFAICT enums are the > > only query result in tab-complete.c that are not identifiers and thus > > subject to case issues. > > I spent some time looking at this

RE: Skipping logical replication transactions on subscriber side

2022-01-17 Thread tanghy.f...@fujitsu.com
On Mon, Jan 17, 2022 2:18 PM Masahiko Sawada wrote: > > I've attached an updated patch. Please review it. > Thanks for updating the patch. Few comments: 1) /* Two_phase is only supported in v15 and higher */ if (pset.sversion >= 15)

RE: Column Filtering in Logical Replication

2022-01-14 Thread tanghy.f...@fujitsu.com
On Friday, January 14, 2022 7:52 PM Amit Kapila wrote: > > On Wed, Jan 12, 2022 at 2:40 AM Justin Pryzby wrote: > > > > Is there any coordination between the "column filter" patch and the "row > > filter" patch ? Are they both on track for PG15 ? Has anybody run them > > together ? > > > >

RE: [PATCH]Add tab completion for foreigh table

2022-01-12 Thread tanghy.f...@fujitsu.com
On Thursday, January 13, 2022 12:38 PM, Fujii Masao wrote: > Isn't it better to tab-complete not only "PARTITION OF" but also "(" for > CREATE > FOREIGN TABLE? Thanks for your review. Left bracket completion added. > IMO it's better to make the docs changes in separate patch because they are

RE: Skipping logical replication transactions on subscriber side

2022-01-12 Thread tanghy.f...@fujitsu.com
On Wed, Jan 12, 2022 2:02 PM Masahiko Sawada wrote: > > I've attached an updated patch that incorporated all comments I got so far. > Thanks for updating the patch. Here are some comments: 1) + Skip applying changes of the particular transaction. If incoming data Should "Skip" be

[PATCH]Add tab completion for foreigh table

2022-01-11 Thread tanghy.f...@fujitsu.com
Hi Attached a patch to improve the tab completion for foreigh table. Also modified some DOC description of ALTER TABLE at [1] in according with CREATE INDEX at [2]. In [1], we use "ALTER INDEX ATTACH PARTITION" In [2], we use "ALTER INDEX ... ATTACH PARTITION" I think the format in [2] is

RE: row filtering for logical replication

2022-01-11 Thread tanghy.f...@fujitsu.com
On Tuesday, January 11, 2022 10:16 AM houzj.f...@fujitsu.com wrote: > > Attach the v62 patch set which address the above comments and slightly > adjust the commit message in 0002 patch. > I saw a possible problem about Row-Filter tablesync SQL, which is related to partition table. If a

RE: Support tab completion for upper character inputs in psql

2022-01-06 Thread tanghy.f...@fujitsu.com
On Friday, January 7, 2022 1:08 PM, Japin Li wrote: > +/* > + * pg_string_tolower - Fold a string to lower case if the string is not > quoted > + * and only contains ASCII characters. > + * For German/Turkish etc text, no change will be made. > + * > + * The returned value has to be freed. > +

RE: Support tab completion for upper character inputs in psql

2022-01-06 Thread tanghy.f...@fujitsu.com
On Thursday, January 6, 2022 11:57 PM, Tom Lane wrote: > > Peter Eisentraut writes: > > So the ordering of the suggested completions is different. I don't know > > offhand how that ordering is determined. Perhaps it's dependent on > > locale, readline version, or operating system. In any

RE: Optionally automatically disable logical replication subscriptions on error

2022-01-05 Thread tanghy.f...@fujitsu.com
On Wednesday, January 5, 2022 8:53 PM osumi.takami...@fujitsu.com wrote: > > On Tuesday, December 28, 2021 11:53 AM Wang, Wei/王 威 > wrote: > > On Thursday, December 16, 2021 8:51 PM osumi.takami...@fujitsu.com > > wrote: > > > Attached the updated patch v14. > > > > A comment to the timing of

RE: [PATCH]Comment improvement in publication.sql

2021-12-30 Thread tanghy.f...@fujitsu.com
On Monday, December 13, 2021 11:53 PM vignesh C wrote: > > On Wed, Dec 8, 2021 at 11:07 AM tanghy.f...@fujitsu.com > wrote: > > > > On Wednesday, December 8, 2021 1:49 PM, vignesh C > wrote: > > > > > The patch no longer applies, could you post a rebase

RE: Failed transaction statistics to measure the logical replication progress

2021-12-30 Thread tanghy.f...@fujitsu.com
On Wednesday, December 22, 2021 6:14 PM osumi.takami...@fujitsu.com wrote: > > Attached the new patch v19. > Thanks for your patch. I think it's better if you could add this patch to the commitfest. Here are some comments: 1) + commit_count bigint + + + Number of

RE: row filtering for logical replication

2021-12-28 Thread tanghy.f...@fujitsu.com
On Mon, Dec 27, 2021 9:16 PM houzj.f...@fujitsu.com wrote: > > On Thur, Dec 23, 2021 4:28 PM Peter Smith wrote: > > Here is the v54* patch set: > > Attach the v55 patch set which add the following testcases in 0003 patch. > 1. Added a test to cover the case where TOASTed values are not

RE: row filtering for logical replication

2021-12-20 Thread tanghy.f...@fujitsu.com
On Tuesday, December 21, 2021 3:03 PM, tanghy.f...@fujitsu.com wrote: > To: Amit Kapila ; Euler Taveira > Cc: Dilip Kumar ; Peter Smith ; > Greg Nancarrow ; Hou, Zhijie/侯 志杰 > ; vignesh C ; Ajin Cherian > ; Rahila Syed ; Peter Eisentraut > ; Önder Kalacı ; > japin ; Mi

RE: row filtering for logical replication

2021-12-20 Thread tanghy.f...@fujitsu.com
On Monday, December 20, 2021 4:47 PM tanghy.f...@fujitsu.com wrote: > On Monday, December 20, 2021 11:24 AM tanghy.f...@fujitsu.com > > > > > On Wednesday, December 8, 2021 2:29 PM Amit Kapila > > wrote: > > > > > > On Mon, Dec 6, 2021 at 6:04 PM Eu

RE: row filtering for logical replication

2021-12-20 Thread tanghy.f...@fujitsu.com
On Monday, December 20, 2021 11:24 AM tanghy.f...@fujitsu.com > > On Wednesday, December 8, 2021 2:29 PM Amit Kapila > wrote: > > > > On Mon, Dec 6, 2021 at 6:04 PM Euler Taveira wrote: > > > > > > On Mon, Dec 6, 2021, at 3:35 AM, Dilip Kumar wrote: >

RE: row filtering for logical replication

2021-12-19 Thread tanghy.f...@fujitsu.com
On Wednesday, December 8, 2021 2:29 PM Amit Kapila wrote: > > On Mon, Dec 6, 2021 at 6:04 PM Euler Taveira wrote: > > > > On Mon, Dec 6, 2021, at 3:35 AM, Dilip Kumar wrote: > > > > On Mon, Dec 6, 2021 at 6:49 AM Euler Taveira wrote: > > > > > > On Fri, Dec 3, 2021, at 8:12 PM, Euler Taveira

RE: parallel vacuum comments

2021-12-13 Thread tanghy.f...@fujitsu.com
On Monday, December 13, 2021 2:12 PM Masahiko Sawada wrote: > > On Mon, Dec 13, 2021 at 2:09 PM Amit Kapila wrote: > > > > On Mon, Dec 13, 2021 at 10:33 AM Masahiko Sawada > wrote: > > > > > > On Fri, Dec 10, 2021 at 9:08 PM Amit Kapila > wrote: > > > > > > > > On Thu, Dec 9, 2021 at 6:05 PM

RE: [PATCH]Comment improvement in publication.sql

2021-12-07 Thread tanghy.f...@fujitsu.com
On Wednesday, December 8, 2021 1:49 PM, vignesh C wrote: > The patch no longer applies, could you post a rebased patch. Thanks for your kindly reminder. Attached a rebased patch. Some changes in v4 patch has been fixed by 5a28324, so I deleted those changes. Regards, Tang

RE: row filtering for logical replication

2021-12-06 Thread tanghy.f...@fujitsu.com
On Friday, December 3, 2021 10:09 AM Peter Smith wrote: > > On Thu, Dec 2, 2021 at 2:32 PM tanghy.f...@fujitsu.com > wrote: > > > > On Thursday, December 2, 2021 5:21 AM Peter Smith > wrote: > > > > > > PSA the v44* set of patches. > >

RE: Alter all tables in schema owner fix

2021-12-02 Thread tanghy.f...@fujitsu.com
On Friday, December 3, 2021 1:31 PM vignesh C wrote: > > On Fri, Dec 3, 2021 at 9:53 AM Greg Nancarrow wrote: > > > > On Fri, Dec 3, 2021 at 2:06 PM vignesh C wrote: > > > > > > Currently while changing the owner of ALL TABLES IN SCHEMA > > > publication, it is not checked if the new owner has

RE: row filtering for logical replication

2021-12-01 Thread tanghy.f...@fujitsu.com
On Thursday, December 2, 2021 5:21 AM Peter Smith wrote: > > PSA the v44* set of patches. > Thanks for the new patch. Few comments: 1. This is an example in publication doc, but in fact it's not allowed. Should we change this example? +CREATE PUBLICATION active_departments FOR TABLE

RE: row filtering for logical replication

2021-11-29 Thread tanghy.f...@fujitsu.com
On Thursday, November 25, 2021 11:22 AM Peter Smith wrote: > > Thanks for all the review comments so far! We are endeavouring to keep > pace with them. > > All feedback is being tracked and we will fix and/or reply to everything ASAP. > > Meanwhile, PSA the latest set of v42* patches. > >

RE: Skipping logical replication transactions on subscriber side

2021-11-25 Thread tanghy.f...@fujitsu.com
On Friday, November 26, 2021 9:30 AM Masahiko Sawada wrote: > > Indeed. Attached an updated patch. Thanks! Thanks for your patch. A small comment: + OID of the relation that the worker is synchronizing; null for the + main apply worker Should we modify it to "OID of the relation

RE: [BUG]Missing REPLICA IDENTITY check when DROP NOT NULL

2021-11-24 Thread tanghy.f...@fujitsu.com
On Wed, Nov 24, 2021 7:29 PM, Michael Paquier wrote: > > On Wed, Nov 24, 2021 at 07:04:51AM +, tanghy.f...@fujitsu.com wrote: > > create table tbl (a int not null unique); > > alter table tbl replica identity using INDEX tbl_a_key; > > alter table tbl alter column a d

[BUG]Missing REPLICA IDENTITY check when DROP NOT NULL

2021-11-23 Thread tanghy.f...@fujitsu.com
Hi, I think I found a problem related to replica identity. According to PG doc at [1], replica identity includes only columns marked NOT NULL. But in fact users can accidentally break this rule as follows: create table tbl (a int not null unique); alter table tbl replica identity using INDEX

RE: row filtering for logical replication

2021-11-22 Thread tanghy.f...@fujitsu.com
On Thursday, November 18, 2021 9:34 AM Peter Smith wrote: > > PSA new set of v40* patches. > I found a problem on v40. The check for Replica Identity in WHERE clause is not working properly. For example: postgres=# create table tbl(a int primary key, b int); CREATE TABLE postgres=# create

RE: Skipping logical replication transactions on subscriber side

2021-11-18 Thread tanghy.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. > > Thanks for your patch. I read the discussion about stats entries for table sync worker[1], the statistics are retained after table sync worker finished its jobs

RE: row filtering for logical replication

2021-11-16 Thread tanghy.f...@fujitsu.com
On Friday, November 12, 2021 6:20 PM Ajin Cherian wrote: > > Attaching version 39- > I met another problem when filtering out with the operator '~'. Data can't be replicated as expected. For example: -- publisher create table t (a text primary key); create publication pub for table t where (a

RE: row filtering for logical replication

2021-11-14 Thread tanghy.f...@fujitsu.com
On Friday, November 12, 2021 6:20 PM Ajin Cherian wrote: > > Attaching version 39- > Thanks for the new patch. I met a problem when using "ALTER PUBLICATION ... SET TABLE ... WHERE ...", the publisher was crashed after executing this statement. Here is some information about this problem.

RE: row filtering for logical replication

2021-11-14 Thread tanghy.f...@fujitsu.com
On Wednesday, November 10, 2021 7:46 AM Peter Smith wrote: > > On Tue, Nov 9, 2021 at 2:03 PM tanghy.f...@fujitsu.com > wrote: > > > > On Friday, November 5, 2021 1:14 PM, Peter Smith > wrote: > > > > > > PSA new set of v37* patches. > > > &

RE: Logical replication timeout problem

2021-11-12 Thread tanghy.f...@fujitsu.com
On Friday, November 12, 2021 2:24 PM Amit Kapila wrote: > > On Thu, Nov 11, 2021 at 11:15 PM Fabrice Chapuis > wrote: > > > > Hello, > > Our lab is ready now. Amit, I compile Postgres 10.18 with your patch.Tang, > > I > used your script to configure logical replication between 2 databases

[BUG]Invalidate relcache when setting REPLICA IDENTITY

2021-11-09 Thread tanghy.f...@fujitsu.com
Hi I think I found a bug related to logical replication(REPLICA IDENTITY in specific). If I change REPLICA IDENTITY after creating publication, the DELETE/UPDATE operations won't be replicated as expected. For example: -- publisher CREATE TABLE tbl(a int, b int); ALTER TABLE tbl ALTER COLUMN

RE: row filtering for logical replication

2021-11-08 Thread tanghy.f...@fujitsu.com
On Friday, November 5, 2021 1:14 PM, Peter Smith wrote: > > PSA new set of v37* patches. > Thanks for your patch. I have a problem when using this patch. The document about "create publication" in patch says: The WHERE clause should contain only columns that are part of the primary key

RE: Skipping logical replication transactions on subscriber side

2021-11-02 Thread tanghy.f...@fujitsu.com
On Friday, October 29, 2021 1:24 PM Masahiko Sawada wrote: > > I've attached a new version patch. Since the syntax of skipping > transaction id is under the discussion I've attached only the error > reporting patch for now. > > Thanks for your patch. Some comments on 026_error_report.pl

RE: Added schema level support for publication.

2021-10-29 Thread tanghy.f...@fujitsu.com
On Friday, October 29, 2021 12:35 PM, Amit Kapila wrote: > > On Thu, Oct 28, 2021 at 9:55 AM vignesh C wrote: > > > > Thanks for committing the patch, please find the remaining patches attached. > > Thanks Hou Zhijie and Greg Nancarrow for sharing a few comments > > offline, I have fixed those

RE: Skipping logical replication transactions on subscriber side

2021-10-27 Thread tanghy.f...@fujitsu.com
On Thursday, October 21, 2021 12:59 PM Masahiko Sawada wrote: > > I've attached updated patches. In this version, in addition to the > review comments I go so far, I've changed the view name from > pg_stat_subscription_errors to pg_stat_subscription_workers as per the > discussion on including

RE: Added schema level support for publication.

2021-10-20 Thread tanghy.f...@fujitsu.com
On Tuesday, October 19, 2021 11:42 PM vignesh C wrote: > > This issue got induced in the v42 version, attached v43 patch has the > fixes for the same. > Thanks for your new patch. I confirmed that this issue has be fixed. All regression tests passed. I also tested V43 in some other scenarios

RE: Added schema level support for publication.

2021-10-18 Thread tanghy.f...@fujitsu.com
On Tuesday, October 19, 2021 12:57 PM Amit Kapila wrote: > > On Tue, Oct 19, 2021 at 9:15 AM tanghy.f...@fujitsu.com > wrote: > > > > On Monday, October 18, 2021 8:23 PM vignesh C > wrote: > > > > > > Thanks for the comments, the attached v

RE: Added schema level support for publication.

2021-10-18 Thread tanghy.f...@fujitsu.com
On Monday, October 18, 2021 8:23 PM vignesh C wrote: > > Thanks for the comments, the attached v42 patch has the fixes for the same. Thanks for your new patch. I tried your patch and found that the permission check for superuser didn't work. For example: postgres=# create role r1; CREATE

RE: Added schema level support for publication.

2021-10-13 Thread tanghy.f...@fujitsu.com
On Wednesday, October 13, 2021 4:10 PM Greg Nancarrow 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

RE: Added schema level support for publication.

2021-10-10 Thread tanghy.f...@fujitsu.com
> On Friday, October 8, 2021 7:05 PM Amit Kapila > wrote: > > v37-0003-Tests-for-FOR-ALL-TABLES-IN-SCHEMA-publication > 3. > --- a/src/bin/pg_dump/t/002_pg_dump.pl > +++ b/src/bin/pg_dump/t/002_pg_dump.pl > .. > + 'ALTER PUBLICATION pub3 ADD ALL TABLES IN SCHEMA dump_test' => { > + create_order

RE: Added schema level support for publication.

2021-09-28 Thread tanghy.f...@fujitsu.com
On Monday, Tuesday, September 28, 2021 10:49 PM, vignesh C wrote: > > Yes this should not be supported, we should throw an error in this case. > This is handled in the v34 patch attached at [1]. > [1] - https://www.postgresql.org/message- >

RE: Added schema level support for publication.

2021-09-28 Thread tanghy.f...@fujitsu.com
On Monday, September 27, 2021 1:32 PM, 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 grammar changes as suggested by Alvaro at [1]. If we agree this

RE: Added schema level support for publication.

2021-09-21 Thread tanghy.f...@fujitsu.com
On Wednesday, September 22, 2021 11:22 AM Masahiko Sawada wrote: > > --- > + if (!IsA(node, String)) > + ereport(ERROR, > + errcode(ERRCODE_SYNTAX_ERROR), > +

RE: [PATCH] support tab-completion for single quote input with equal sign

2021-09-15 Thread tanghy.f...@fujitsu.com
On Saturday, September 4, 2021 11:58 PM, Tom Lane wrote: >Actually ... those are just implementation details, and now that >I've thought about it a little more, I question the entire concept >of making single-quoted strings be single words in tab-complete's >view. I think it's quite intentional

RE: Remove double check when field_name is not NULL in be-secure-openssl.c

2021-09-15 Thread tanghy.f...@fujitsu.com
On Wednesday, September 15, 2021 6:54 PM, Daniel Gustafsson wrote: >The proposal removes a second == NULL check on field_name in the case where >OBJ_nid2sn() returns an ASN1_OBJECT. This is not in a hot path, and the ASM >generated is equal under optimization levels so I don't see the value in

Remove double check when field_name is not NULL in be-secure-openssl.c

2021-09-15 Thread tanghy.f...@fujitsu.com
Hi Attached a small fix to remove double check when field_name is not NULL in be-secure-openssl.c. The double check is introduced in 13cfa02f7 for "Improve error handling in backend OpenSSL implementation". Regards, Tang v1-0001-remove-double-check-when-field_name-is-not-NULL-i.patch

RE: Added schema level support for publication.

2021-09-13 Thread tanghy.f...@fujitsu.com
On Sunday, September 12, 2021 11:13 PM vignesh C wrote: > > Thanks for the changes, the suggested changes make the parsing code > simpler. I have merged the changes to the main patch. Attached v27 > patch has the changes for the same. > Thanks for your new patch. I had a look at the changes

RE: Support tab completion for upper character inputs in psql

2021-09-10 Thread tanghy.f...@fujitsu.com
On Tuesday, September 7, 2021 5:25 PM, Peter Eisentraut wrote: >The coding of valid_input_text() seems a bit bulky. I think you can do >the same thing using strspn() without a loop. Thanks, modified in V9 patch. >The name is also not great. It's not like other strings are not "valid".

RE: [PATCH] Add tab-complete for backslash commands

2021-09-08 Thread tanghy.f...@fujitsu.com
On Wednesday, September 8, 2021 5:05 AM, Tom Lane wrote: >Sure, but he'd still get all the commands, just not all the possible >spellings of each one. And a person who's not sure what's available >is unlikely to be helped by an entry for "\c", because it's entirely >not clear which command

RE: [BUG] Unexpected action when publishing partition tables

2021-09-07 Thread tanghy.f...@fujitsu.com
> > > --- > > > PublicationAddTables > > > publication_add_relation > > > /* Invalidate relcache so that publication info is > > > rebuilt. */ > > > CacheInvalidateRelcache(targetrel); > > > --- > > > > > > In addition, this problem can happen in both ADD

[BUG] Unexpected action when publishing partition tables

2021-09-06 Thread tanghy.f...@fujitsu.com
Hi I met a problem when using logical replication. Maybe it's a bug in logical replication. When publishing a partition table without replica identity, update or delete operation can be successful in some cases. For example: create table tbl1 (a int) partition by range ( a ); create table

RE: [PATCH] Add tab-complete for backslash commands

2021-09-05 Thread tanghy.f...@fujitsu.com
On Sunday, September 5, 2021 1:42 AM, Tom Lane wrote: >I particularly question why we'd offer both >single- and multiple-character versions, as the single-character >version seems entirely useless from a completion standpoint. I generally agreed with your opinion. But I'm not sure if there's

RE: Added schema level support for publication.

2021-09-05 Thread tanghy.f...@fujitsu.com
On Thursday, September 2, 2021 2:36 PM vignesh C wrote: > > On Wed, Sep 1, 2021 at 11:14 AM tanghy.f...@fujitsu.com > wrote: > > > > 3. When using '\dn+', I noticed that the list of publications only contains > > the > > publications for "SCHEMA",

RE: [PATCH] support tab-completion for single quote input with equal sign

2021-09-02 Thread tanghy.f...@fujitsu.com
On Friday, September 3, 2021 2:14 AM, Jacob Champion wrote >I applied your patch against HEAD (and did a clean build for good >measure) but couldn't get the tab-completion you described -- on my >machine, `PUBLICATION` still fails to complete. Tab completion is >working in general, for example

RE: Added schema level support for publication.

2021-08-31 Thread tanghy.f...@fujitsu.com
> On Monday, August 30, 2021 11:28 PM vignesh C wrote: > > I have fixed these comments as part of v23 patch attached at [1]. > [1] - https://www.postgresql.org/message- > id/CALDaNm0xmqJeQEfV5Wnj2BawM%3DsdFdfOXz5N%2BgGG3WB6k9%3Dtdw > %40mail.gmail.com > Thanks for your new patch. Here are some

RE: Added schema level support for publication.

2021-08-30 Thread tanghy.f...@fujitsu.com
On Friday, August 27, 2021 2:13 PM vignesh C wrote: > > I have implemented this in the 0003 patch, I have kept it separate to > reduce the testing effort and also it will be easier if someone > disagrees with the syntax. I will merge it to the main patch later > based on the feedback. Attached

RE: Added schema level support for publication.

2021-08-25 Thread tanghy.f...@fujitsu.com
On Wednesday, August 25, 2021 5:37 PM vignesh C wrote: > > Attached v21 patch has the changes based on the new syntax and fixes > few of the other review comments provided by reviewers. > Thanks for your new patch. I saw the following warning when building, please have a look.

RE: Skipping logical replication transactions on subscriber side

2021-08-24 Thread tanghy.f...@fujitsu.com
On Wednesday, August 25, 2021 12:22 PM Masahiko Sawada wrote: > > Attached updated version patches. Please review them. > Thanks for your new patch. The v11-0001 patch LGTM. Regards Tang

RE: Skipping logical replication transactions on subscriber side

2021-08-24 Thread tanghy.f...@fujitsu.com
On Monday, August 23, 2021 11:09 AM Masahiko Sawada wrote: > > I've attached updated patches. Please review them. > I tested v10-0001 patch in both streaming and no-streaming more. All tests works well. I also tried two-phase commit feature, the error context was set as expected, but

RE: Skipping logical replication transactions on subscriber side

2021-08-20 Thread tanghy.f...@fujitsu.com
> On Thursday, August 19, 2021 9:53 AM Masahiko Sawada > wrote: > > Thank you for reporting the issue! This issue must be fixed in the > latest (v9) patches I've just submitted[1]. > Thanks for your patch. I've confirmed the issue is fixed as you said. Regards Tang

RE: [PATCH]Remove obsolete macro CHECKFLOATVAL in btree_gist

2021-08-18 Thread tanghy.f...@fujitsu.com
On Thursday, August 19, 2021 12:28 PM, Michael Paquier wrote >On Wed, Aug 18, 2021 at 10:04:04AM +0900, Michael Paquier wrote: >> Yes, that does not seem wise on performance grounds. The case of >> !zero_is_valid is never reached, so it seems like this code was just a >> copy-paste from the

RE: [PATCH]Remove obsolete macro CHECKFLOATVAL in btree_gist

2021-08-17 Thread tanghy.f...@fujitsu.com
On Friday, August 6, 2021 11:14 PM, tanghy.f...@fujitsu.com wrote: >Commit 6bf0bc842 replaced float.c's CHECKFLOATVAL() macro with static inline >subroutines, >but the fix introduced a performance regression as Tom Lane pointed out and >fixed at 607f8ce74. > >Found obso

RE: Skipping logical replication transactions on subscriber side

2021-08-17 Thread tanghy.f...@fujitsu.com
On Thursday, August 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 your patch. I met a problem when using it. The

RE: [PATCH]Comment improvement in publication.sql

2021-08-08 Thread tanghy.f...@fujitsu.com
On Sunday, August 8, 2021 6:34 PM, vignesh C wrote >Thanks for the updated patch, your changes look good to me. You might >want to include the commit message in the patch, that will be useful. Thanks for your kindly suggestion. Updated patch attached. Added the patch commit message with no new

RE: [PATCH] Add tab-complete for backslash commands

2021-08-08 Thread tanghy.f...@fujitsu.com
On Sunday, August 8, 2021 8:13 AM, Dagfinn Ilmari Mannsåker wrote: >> +"\\r", "\\rset", > >There's a typo here, that should be "\\reset". Also, I noticed that for >\connect, the situation is the opposite: it has the full form but not >the short form (\c). > >I've addressed both in

[PATCH]Remove obsolete macro CHECKFLOATVAL in btree_gist

2021-08-06 Thread tanghy.f...@fujitsu.com
Hi Commit 6bf0bc842 replaced float.c's CHECKFLOATVAL() macro with static inline subroutines, but the fix introduced a performance regression as Tom Lane pointed out and fixed at 607f8ce74. Found obsolete CHECKFLOATVAL usage in contrib/btree_gist, and tried to fix it according to 607f8ce74.

RE: [PATCH]Comment improvement in publication.sql

2021-08-06 Thread tanghy.f...@fujitsu.com
Hi I saw some inaccurate comments for AlterPublicationStmt structure when reviewing patches related to publication[1]. The variable tables are used for 'ALTER PUBLICATION ... ADD/DROP/SET TABLE', but the comments only say 'ADD/DROP'. How about add 'SET' to the comments? typedef struct

RE: Added schema level support for publication.

2021-08-04 Thread tanghy.f...@fujitsu.com
On Tuesday, August 3, 2021 11:08 PM vignesh C wrote: > > Thanks for reporting this, this is fixed in the v18 patch attached. Thanks for fixing it. Few suggestions for V18: 1. +# Clean up the tables on both publisher and subscriber as we don't need them +$node_publisher->safe_psql('postgres',

RE: [HACKERS] logical decoding of two-phase transactions

2021-08-03 Thread tanghy.f...@fujitsu.com
On Tuesday, August 3, 2021 6:03 PM vignesh C wrote: > > On Tue, Aug 3, 2021 at 12:32 PM Amit Kapila wrote: > > > > On Tue, Aug 3, 2021 at 6:17 AM Peter Smith wrote: > > > > > > Please find attached the latest patch set v102* > > > > > > > I have made minor modifications in the comments and

RE: Added schema level support for publication.

2021-08-03 Thread tanghy.f...@fujitsu.com
On Monday, August 2, 2021 11:40 PM vignesh C wrote: > > Thanks for the comments, attached v17 patches has the fixes for the same. Thanks for your new patch. I saw the following warning when compiling. It seems we don't need this variable any more. publicationcmds.c: In function

RE: [PATCH]Comment improvement in publication.sql

2021-08-02 Thread tanghy.f...@fujitsu.com
On Monday, August 2, 2021 11:56 PM vignesh C wrote: > > Few minor suggestions: > 1) Should we change below to "fail - tables can't be added, dropped or > set to "FOR ALL TABLES" publications" > --- fail - can't add to for all tables publication > +-- fail - tables can't be added to or dropped

[PATCH]Comment improvement in publication.sql

2021-08-02 Thread tanghy.f...@fujitsu.com
Hi Hackers When review and test another patch at [1], I found some comments in existing test code of " src/test/regress/sql/publication.sql " is a little bit confused. Attached a patch to fix them, please take a check. Here is the detail: Existing code: CREATE TABLE testpub_tbl2 (id serial

RE: [HACKERS] logical decoding of two-phase transactions

2021-07-30 Thread tanghy.f...@fujitsu.com
On Friday, July 30, 2021 12:02 PM Peter Smith wrote: > > Please find attached the latest patch set v100* > > v99-0002 --> v100-0001 > Thanks for your patch. A few comments on the test file: 1. src/test/subscription/t/022_twophase_cascade.pl 1.1 I saw your test cases for "PREPARE / COMMIT

RE: Added schema level support for publication.

2021-07-27 Thread tanghy.f...@fujitsu.com
On Monday, July 26, 2021 1:25 PM vignesh C mailto:vignes...@gmail.com>> wrote: > > On Mon, Jul 26, 2021 at 7:41 AM > tanghy.f...@fujitsu.com<mailto:tanghy.f...@fujitsu.com> > mailto:tanghy.f...@fujitsu.com>> wrote: > > > > On Friday, July 23,

RE: [Doc] Tiny fix for regression tests example

2021-07-25 Thread tanghy.f...@fujitsu.com
On Monday, July 26, 2021 1:04 PM, Michael Paquier wrote: >> -make check PGOPTIONS="-c log_checkpoints=on -c work_mem=50MB" >> +make check PGOPTIONS="-c geqo=off -c work_mem=50MB" >> >> log_checkpoints couldn't be set in PGOPTIONS. >> >> Replace log_checkpoints with geqo in the example code >>

RE: Added schema level support for publication.

2021-07-25 Thread tanghy.f...@fujitsu.com
On Friday, July 23, 2021 8:18 PM vignesh C wrote: > > I have changed it to not report any error, this issue is fixed in the > v14 patch attached at [1]. > [1] - https://www.postgresql.org/message- > id/CALDaNm3DTj535ezfmm8QHLOtOkcHF2ZcCfSjfR%3DVbTbLZXFRsA%40mail.g > mail.com > Thanks for your

[Doc] Tiny fix for regression tests example

2021-07-23 Thread tanghy.f...@fujitsu.com
Hi When reading PG DOC, found some example code not correct as it said. https://www.postgresql.org/docs/devel/regress-run.html Here's a tiny fix in regress.sgml. -make check PGOPTIONS="-c log_checkpoints=on -c work_mem=50MB" +make check PGOPTIONS="-c geqo=off -c work_mem=50MB"

  1   2   >