From a8d5967706aad5ceaa6a8a4ad7974f2b0eb7f3b6 Mon Sep 17 00:00:00 2001 From: Bertrand Drouvot Date: Thu, 20 Aug 2026 04:51:24 +0000 Subject: [PATCH] Use index collation when locating replicated rows Set the scan key collation from the index so replicated row lookups use the index's ordering rules. This follows PostgreSQL commit https://github.com/postgres/postgres/commit/5e1963fb764e9cc092e0f7b58b28985c311431d9 --- src/pgactive_executor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pgactive_executor.c b/src/pgactive_executor.c index 75ec4742..444588e0 100644 --- a/src/pgactive_executor.c +++ b/src/pgactive_executor.c @@ -235,6 +235,8 @@ build_index_scan_key(ScanKey skey, Relation rel, Relation idxrel, pgactiveTupleD regop, tup->values[mainattno - 1]); + skey[attoff].sk_collation = idxrel->rd_indcollation[attoff]; + if (tup->isnull[mainattno - 1]) { hasnulls = true;