On Thu, Mar 2, 2023 at 3:00 PM Önder Kalacı <onderkal...@gmail.com> wrote: >> >> Few comments: >> =============== >> 1. >> + identity. When replica identity <literal>FULL</literal> is specified, >> + indexes can be used on the subscriber side for searching the rows. These >> + indexes should be btree, >> >> Why only btree and not others like a hash index? Also, there should be >> some comments in FindUsableIndexForReplicaIdentityFull() to explain >> the choices. > > > I updated the comment(s). > > For a more technical reference, we have these restrictions, because we rely on > RelationFindReplTupleByIndex() which is designed to handle PK/RI. And, > RelationFindReplTupleByIndex() is written in a way that only expects > indexes with these limitations. > > In order to keep the changes as small as possible, I refrained from relaxing > this > limitation for now. I'm definitely up to working on this for relaxing these > limitations, and practically allowing more cases for non-unique indexes. >
See, I think I understand why partial/expression indexes can't be supported. It seems to me that because the required tuple may not satisfy the expression and that won't work for our case. But what are other limitations you see due to which we can't support other index types for non-unique indexes? Is it just a matter of testing other index types or there is something more to it, if so, we should add comments so that they can be supported in the future if it is feasible to do so. > > Attached are both patches: the main patch, and the patch that > optionally disables the index scans. > Both the patches are numbered 0001. It would be better to number them as 0001 and 0002. -- With Regards, Amit Kapila.