Content-Length: 287017 | pFad | http://github.com/postgrespro/postgres_cluster/commit/0de25ca7f1686f4a292dc6915bb73b3ed486b91c

55 Support covering indexes in logical deconding · postgrespro/postgres_cluster@0de25ca · GitHub
Skip to content

Commit 0de25ca

Browse files
knizhnikkelvich
authored andcommitted
Support covering indexes in logical deconding
1 parent a90a2de commit 0de25ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contrib/mmts/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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/0de25ca7f1686f4a292dc6915bb73b3ed486b91c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy