RE: Fix apply worker crash when subscriber table has only a deferrable primary key - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: Fix apply worker crash when subscriber table has only a deferrable primary key
Date
Msg-id OS7PR01MB18317206B6E72455D8BFED585F58A2@OS7PR01MB18317.jpnprd01.prod.outlook.com
Whole thread
In response to Re: Fix apply worker crash when subscriber table has only a deferrable primary key  (Nisha Moond <nisha.moond412@gmail.com>)
List pgsql-hackers
Dear Nisha,

> My understanding is also the same. Thanks for the patch; I’ve verified the fix.
> 
> Here is the updated version, merged with v3-0001.
> 
> v4-0001: Updated stale comments in RelationFindDeletedTupleInfoSeq(),
> corrected the new comments in FindDeletedTupleInLocalRel(), and added
> an assertion that the whole row is compared only when the publisher
> uses REPLICA IDENTITY FULL.

Thanks. One comments for 0001:

```
        /* Without such an index, every column is compared. */
        Assert(relmapentry->idxisreplident ||
               relmapentry->remoterel.replident == REPLICA_IDENTITY_FULL);
```

I feel the first condition is something like transitive. Here we want to confirm
whether 1) we can pick indexed columns or 2) all columns are replicated. So it's
better to directly check the existence of the index:

```
        Assert(OidIsValid(idxoid) ||
               relmapentry->remoterel.replident == REPLICA_IDENTITY_FULL);
```

Best regards,
Hayato Kuroda
FUJITSU LIMITED


pgsql-hackers by date:

Previous
From: "ZizhuanLiu X-MAN"
Date:
Subject: Re: Optimize MCV stats for sortable types and utilize sorted-order properties
Next
From: shihao zhong
Date:
Subject: Commitfest PG20-2 is now closed