postgresql/src/backend
Tom Lane 5e26aa641e Test, don't just Assert, that mergejoin's inputs are in order.
There are two Asserts in nodeMergejoin.c that are reachable if
the input data is not in the expected order.  This seems way too
fragile.  Alexander Lakhin reported a case where the assertions
could be triggered with misconfigured foreign-table partitions,
and bitter experience with unstable operating system collation
definitions suggests another easy route to hitting them.  Neither
Assert is in a place where we can't afford one more test-and-branch,
so replace 'em with plain test-and-elog logic.

Per bug #17395.  While the reported symptom is relatively recent,
collation changes could happen anytime, so back-patch to all
supported branches.

Discussion: https://postgr.es/m/17395-8c326292078d1a57@postgresql.org
2022-02-05 11:59:29 -05:00
..
access Allow archiving via loadable modules. 2022-02-03 14:05:02 -05:00
bootstrap pg_upgrade: Preserve relfilenodes and tablespace OIDs. 2022-01-17 13:40:27 -05:00
catalog Add UNIQUE null treatment option 2022-02-03 11:48:21 +01:00
commands Add UNIQUE null treatment option 2022-02-03 11:48:21 +01:00
executor Test, don't just Assert, that mergejoin's inputs are in order. 2022-02-05 11:59:29 -05:00
foreign Update copyright for 2022 2022-01-07 19:04:57 -05:00
jit Track LLVM 14 API changes, up to 2022-01-30. 2022-02-04 16:16:10 +13:00
lib Update copyright for 2022 2022-01-07 19:04:57 -05:00
libpq Fix pg_hba_file_rules for authentication method cert 2022-01-26 09:58:59 +01:00
main windows: Improve crash / assert / exception handling. 2022-02-02 18:33:25 -08:00
nodes Add UNIQUE null treatment option 2022-02-03 11:48:21 +01:00
optimizer Consider parallel awareness when removing single-child Appends 2022-01-25 21:10:03 +13:00
parser Add UNIQUE null treatment option 2022-02-03 11:48:21 +01:00
partitioning Update copyright for 2022 2022-01-07 19:04:57 -05:00
po Translation updates 2021-06-21 12:33:50 +02:00
port Update copyright for 2022 2022-01-07 19:04:57 -05:00
postmaster Allow archiving via loadable modules. 2022-02-03 14:05:02 -05:00
regex Call pg_newlocale_from_collation() also with default collation 2022-01-20 09:50:18 +01:00
replication Improve invalidation handling in pgoutput.c. 2022-02-04 07:30:40 +05:30
rewrite Update copyright for 2022 2022-01-07 19:04:57 -05:00
snowball Update copyright for 2022 2022-01-07 19:04:57 -05:00
statistics Fix various typos, grammar and code style in comments and docs 2022-01-25 09:40:04 +09:00
storage Remove xloginsert.h from xlog.h 2022-01-30 12:25:24 -03:00
tcop Update copyright for 2022 2022-01-07 19:04:57 -05:00
tsearch Update copyright for 2022 2022-01-07 19:04:57 -05:00
utils Improve worst-case performance of text_position_get_match_pos() 2022-02-04 10:53:24 -05:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Server-side gzip compression. 2022-01-24 15:13:18 -05:00
nls.mk Report progress of startup operations that take a long time. 2021-10-25 11:51:57 -04:00