Re: Conflict Detection and Resolution

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Jan Wieck <jan(at)wi3ck(dot)info>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Subject: Re: Conflict Detection and Resolution
Date: 2024-09-03 09:41:45
Message-ID: CALDaNm0MVhW2+dkbBfmfLK8wPdF_X5MwBLLs6Ag7SjtcUAK6FA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 30 Aug 2024 at 11:01, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> wrote:
>
> Here is the v11 patch-set. Changes are:

1) This command crashes:
ALTER SUBSCRIPTION name RESET CONFLICT RESOLVER FOR NULL;
#0 __strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:116
#1 0x000055c67270600a in ResetConflictResolver (subid=16404,
conflict_type=0x0) at conflict.c:744
#2 0x000055c67247e0c3 in AlterSubscription (pstate=0x55c6748ff9d0,
stmt=0x55c67497dfe0, isTopLevel=true) at subscriptioncmds.c:1664

+ | ALTER SUBSCRIPTION name RESET CONFLICT
RESOLVER FOR conflict_type
+ {
+ AlterSubscriptionStmt *n =
+ makeNode(AlterSubscriptionStmt);
+
+ n->kind =
ALTER_SUBSCRIPTION_RESET_CONFLICT_RESOLVER;
+ n->subname = $3;
+ n->conflict_type = $8;
+ $$ = (Node *) n;
+ }
+ ;
+conflict_type:
+ Sconst
{ $$ = $1; }
+ | NULL_P
{ $$ = NULL; }
;

May be conflict_type should be changed to:
+conflict_type:
+ Sconst
{ $$ = $1; }
;
2) Conflict resolver is not shown in describe command:
postgres=# \dRs+

List of subscriptions
Name | Owner | Enabled | Publication | Binary | Streaming |
Two-phase commit | Disable on error | Origin | Password required | Run
as owner? | Failover | Synchronous commit | Conninfo
| Skip LSN
------+---------+---------+-------------+--------+-----------+------------------+------------------+--------+-------------------+---------------+----------+--------------------+----------------------------------
--------+----------
sub1 | vignesh | t | {pub1} | f | off | d
| f | any | t | f
| f | off | dbname=postgres host=localhost po
rt=5432 | 0/0
sub2 | vignesh | t | {pub1} | f | off | d
| f | any | t | f
| f | off | dbname=postgres host=localhost po
rt=5432 | 0/0
(2 rows)

3) Tab completion is not handled to include Conflict resolver:
postgres=# alter subscription sub1
ADD PUBLICATION CONNECTION DISABLE DROP
PUBLICATION ENABLE OWNER TO REFRESH
PUBLICATION RENAME TO SET SKIP (

Regards,
Vignesh

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2024-09-03 09:51:47 Re: Inconsistency between try_mergejoin_path and create_mergejoin_plan
Previous Message Peter Eisentraut 2024-09-03 09:41:20 Re: altering a column's collation leaves an invalid foreign key