Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit74edabc

Browse files
committed
Support for GiST in get_equal_strategy_number()
A WITHOUT OVERLAPS primary key or unique constraint is accepted as aREPLICA IDENTITY, since it guarantees uniqueness. But subscribersapplying logical decoding messages would fail because there was notsupport for looking up the equals operator for a gist index. Thisfixes that: For GiST indexes we can use the stratnum GiST supportfunction.Reviewed-by: Paul Jungwirth <pj@illuminatedcomputing.com>Reviewed-by: vignesh C <vignesh21@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/CA+renyUApHgSZF9-nd-a0+OPGharLQLO=mDHcY4_qQ0+noCUVg@mail.gmail.com
1 parent13544e7 commit74edabc

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

‎src/backend/executor/execReplication.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include"postgres.h"
1616

1717
#include"access/genam.h"
18+
#include"access/gist.h"
1819
#include"access/relscan.h"
1920
#include"access/tableam.h"
2021
#include"access/transam.h"
@@ -40,11 +41,6 @@ static bool tuples_equal(TupleTableSlot *slot1, TupleTableSlot *slot2,
4041
/*
4142
* Returns the fixed strategy number, if any, of the equality operator for the
4243
* given operator class, otherwise, InvalidStrategy.
43-
*
44-
* Currently, only Btree and Hash indexes are supported. The other index access
45-
* methods don't have a fixed strategy for equality operation - instead, the
46-
* support routines of each operator class interpret the strategy numbers
47-
* according to the operator class's definition.
4844
*/
4945
StrategyNumber
5046
get_equal_strategy_number(Oidopclass)
@@ -60,8 +56,10 @@ get_equal_strategy_number(Oid opclass)
6056
caseHASH_AM_OID:
6157
ret=HTEqualStrategyNumber;
6258
break;
59+
caseGIST_AM_OID:
60+
ret=GistTranslateStratnum(opclass,RTEqualStrategyNumber);
61+
break;
6362
default:
64-
/* XXX: Only Btree and Hash indexes are supported */
6563
ret=InvalidStrategy;
6664
break;
6765
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp