Skip to content

Commit 961e2f4

Browse files
knizhnikkelvich
authored andcommitted
Support covering indexes in logical deconding
1 parent 1f25dfe commit 961e2f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pglogical_apply.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ find_pkey_tuple(ScanKey skey, Relation rel, Relation idxrel,
101101
InitDirtySnapshot(snap);
102102
scan = index_beginscan(rel, idxrel,
103103
&snap,
104-
RelationGetNumberOfAttributes(idxrel),
104+
IndexRelationGetNumberOfKeyAttributes(idxrel),
105105
0);
106106

107107
retry:
108108
found = false;
109109

110-
index_rescan(scan, skey, RelationGetNumberOfAttributes(idxrel), NULL, 0);
110+
index_rescan(scan, skey, IndexRelationGetNumberOfKeyAttributes(idxrel), NULL, 0);
111111

112112
if ((scantuple = index_getnext(scan, ForwardScanDirection)) != NULL)
113113
{
@@ -236,7 +236,7 @@ build_index_scan_key(ScanKey skey, Relation rel, Relation idxrel, TupleData *tup
236236
indkey = (int2vector *) DatumGetPointer(indkeyDatum);
237237

238238

239-
for (attoff = 0; attoff < RelationGetNumberOfAttributes(idxrel); attoff++)
239+
for (attoff = 0; attoff < IndexRelationGetNumberOfKeyAttributes(idxrel); attoff++)
240240
{
241241
Oid operator;
242242
Oid opfamily;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy