Skip to content

Commit 321c287

Browse files
committed
Improve internal logical replication error for missing equality strategy
This "shouldn't happen", except right now it can with a temporal gist index (to be fixed soon), because of missing gist support in get_equal_strategy_number(). But right now, the error is not caught right away, but instead you get the subsequent error about a "missing operator 0". This makes the error more accurate. Author: Paul Jungwirth <pj@illuminatedcomputing.com> Discussion: https://www.postgresql.org/message-id/flat/CA+renyUApHgSZF9-nd-a0+OPGharLQLO=mDHcY4_qQ0+noCUVg@mail.gmail.com
1 parent d37e856 commit 321c287

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/executor/execReplication.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ build_replindex_scan_key(ScanKey skey, Relation rel, Relation idxrel,
134134
optype = get_opclass_input_type(opclass->values[index_attoff]);
135135
opfamily = get_opclass_family(opclass->values[index_attoff]);
136136
eq_strategy = get_equal_strategy_number(opclass->values[index_attoff]);
137+
if (!eq_strategy)
138+
elog(ERROR, "missing equal strategy for opclass %u", opclass->values[index_attoff]);
137139

138140
operator = get_opfamily_member(opfamily, optype,
139141
optype,

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