postgres/contrib
Masahiko Sawada dfd8e6c73e Fix an issue with index scan using pg_trgm due to char signedness on different architectures.
GIN and GiST indexes utilizing pg_trgm's opclasses store sorted
trigrams within index tuples. When comparing and sorting each trigram,
pg_trgm treats each character as a 'char[3]' type in C. However, the
char type in C can be interpreted as either signed char or unsigned
char, depending on the platform, if the signedness is not explicitly
specified. Consequently, during replication between different CPU
architectures, there was an issue where index scans on standby servers
could not locate matching index tuples due to the differing treatment
of character signedness.

This change introduces comparison functions for trgm that explicitly
handle signed char and unsigned char. The appropriate comparison
function will be dynamically selected based on the character
signedness stored in the control file. Therefore, upgraded clusters
can utilize the indexes without rebuilding, provided the cluster
upgrade occurs on platforms with the same character signedness as the
original cluster initialization.

The default char signedness information was introduced in 44fe30fdab,
so no backpatch.

Reviewed-by: Noah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/CB11ADBC-0C3F-4FE0-A678-666EE80CBB07%40amazon.com
2025-02-21 10:27:39 -08:00
..
amcheck Fix grammatical typos around possessive "its" 2025-01-29 14:39:14 +07:00
auth_delay Update copyright for 2025 2025-01-01 11:21:55 -05:00
auto_explain Don't lock partitions pruned by initial pruning 2025-02-20 17:09:48 +09:00
basebackup_to_shell Improve grammar of options for command arrays in TAP tests 2025-01-22 14:47:13 +09:00
basic_archive Update copyright for 2025 2025-01-01 11:21:55 -05:00
bloom Add is_analyze parameter to vacuum_delay_point(). 2025-02-11 16:38:14 -06:00
bool_plperl Update copyright for 2025 2025-01-01 11:21:55 -05:00
btree_gin Update copyright for 2025 2025-01-01 11:21:55 -05:00
btree_gist Drop opcintype from index AM strategy translation API 2025-02-21 09:07:16 +01:00
citext Update copyright for 2025 2025-01-01 11:21:55 -05:00
cube Update copyright for 2025 2025-01-01 11:21:55 -05:00
dblink Update copyright for 2025 2025-01-01 11:21:55 -05:00
dict_int Update copyright for 2025 2025-01-01 11:21:55 -05:00
dict_xsyn Update copyright for 2025 2025-01-01 11:21:55 -05:00
earthdistance Update copyright for 2025 2025-01-01 11:21:55 -05:00
file_fdw Add is_analyze parameter to vacuum_delay_point(). 2025-02-11 16:38:14 -06:00
fuzzystrmatch Remove unnecessary (char *) casts [string] 2025-02-12 08:49:18 +01:00
hstore Update copyright for 2025 2025-01-01 11:21:55 -05:00
hstore_plperl Use @extschema:name@ notation in contrib transform modules. 2025-01-09 15:16:56 -05:00
hstore_plpython Use @extschema:name@ notation in contrib transform modules. 2025-01-09 15:16:56 -05:00
intagg Update copyright for 2025 2025-01-01 11:21:55 -05:00
intarray Specialize intarray sorting 2025-02-18 11:04:55 +07:00
isn Update copyright for 2025 2025-01-01 11:21:55 -05:00
jsonb_plperl Update copyright for 2025 2025-01-01 11:21:55 -05:00
jsonb_plpython Update copyright for 2025 2025-01-01 11:21:55 -05:00
lo Repair incorrect handling of AfterTriggerSharedData.ats_modifiedcols. 2025-01-22 11:58:20 -05:00
ltree Remove various unnecessary (char *) casts 2025-02-20 19:49:27 +01:00
ltree_plpython Use @extschema:name@ notation in contrib transform modules. 2025-01-09 15:16:56 -05:00
oid2name Update copyright for 2025 2025-01-01 11:21:55 -05:00
pageinspect Remove unnecessary (char *) casts [checksum] 2025-02-12 08:59:48 +01:00
passwordcheck Add passwordcheck.min_password_length. 2025-01-07 15:06:40 -06:00
pg_buffercache Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_freespacemap pg_freespacemap: Fix declaration of pg_freespace(regclass) 2025-01-08 13:16:43 +09:00
pg_logicalinspect Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_prewarm Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_stat_statements Don't lock partitions pruned by initial pruning 2025-02-20 17:09:48 +09:00
pg_surgery Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_trgm Fix an issue with index scan using pg_trgm due to char signedness on different architectures. 2025-02-21 10:27:39 -08:00
pg_visibility Remove unnecessary (char *) casts [xlog] 2025-02-13 10:57:07 +01:00
pg_walinspect Update copyright for 2025 2025-01-01 11:21:55 -05:00
pgcrypto pgcrypto: Add support for CFB mode in AES encryption 2025-02-14 21:18:37 +01:00
pgrowlocks Update copyright for 2025 2025-01-01 11:21:55 -05:00
pgstattuple Update copyright for 2025 2025-01-01 11:21:55 -05:00
postgres_fdw Remove various unnecessary (char *) casts 2025-02-20 19:49:27 +01:00
seg Update copyright for 2025 2025-01-01 11:21:55 -05:00
sepgsql sepgsql: update TAP test to use fat comma style 2025-02-04 15:51:42 +01:00
spi Update copyright for 2025 2025-01-01 11:21:55 -05:00
sslinfo Remove support for linking with libeay32 and ssleay32 2025-02-06 20:26:46 +01:00
start-scripts Remove gratuitous references to postmaster program 2023-01-26 10:48:32 +01:00
tablefunc Update copyright for 2025 2025-01-01 11:21:55 -05:00
tcn Update copyright for 2025 2025-01-01 11:21:55 -05:00
test_decoding Skip logical decoding of already-aborted transactions. 2025-02-12 16:31:34 -08:00
tsm_system_rows Update copyright for 2025 2025-01-01 11:21:55 -05:00
tsm_system_time Update copyright for 2025 2025-01-01 11:21:55 -05:00
unaccent Update copyright for 2025 2025-01-01 11:21:55 -05:00
uuid-ossp Update copyright for 2025 2025-01-01 11:21:55 -05:00
vacuumlo Update copyright for 2025 2025-01-01 11:21:55 -05:00
xml2 Remove unnecessary (char *) casts [mem] 2025-02-12 08:50:13 +01:00
contrib-global.mk Respect TEMP_CONFIG when pg_regress_check and friends are called 2016-02-27 12:28:21 -05:00
Makefile Add contrib/pg_logicalinspect. 2024-10-14 17:22:02 -07:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
README Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00

The PostgreSQL contrib tree
---------------------------

This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly
because they address a limited audience or are too experimental to be
part of the main source tree.  This does not preclude their
usefulness.

User documentation for each module appears in the main SGML
documentation.

When building from the source distribution, these modules are not
built automatically, unless you build the "world" target.  You can
also build and install them all by running "make all" and "make
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.

Some directories supply new user-defined functions, operators, or
types.  To make use of one of these modules, after you have installed
the code you need to register the new SQL objects in the database
system by executing a CREATE EXTENSION command.  In a fresh database,
you can simply do

    CREATE EXTENSION module_name;

See the PostgreSQL documentation for more information about this
procedure.