git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d37e856)
Improve internal logical replication error for missing equality strategy
2024年12月10日 11:30:42 +0000 (12:30 +0100)
2024年12月10日 11:30:42 +0000 (12:30 +0100)
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


diff --git a/src/backend/executor/execReplication.c b/src/backend/executor/execReplication.c
index 368a40337aa5b55e07bc990d0c38ddfcb3f34d90..c8b79f42c24a81075664d462cdff61f999e04122 100644 (file)
--- a/src/backend/executor/execReplication.c
+++ b/src/backend/executor/execReplication.c
@@ -134,6 +134,8 @@ build_replindex_scan_key(ScanKey skey, Relation rel, Relation idxrel,
optype = get_opclass_input_type(opclass->values[index_attoff]);
opfamily = get_opclass_family(opclass->values[index_attoff]);
eq_strategy = get_equal_strategy_number(opclass->values[index_attoff]);
+ if (!eq_strategy)
+ elog(ERROR, "missing equal strategy for opclass %u", opclass->values[index_attoff]);
operator = get_opfamily_member(opfamily, optype,
optype,
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /