]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Test, don't just Assert, that mergejoin's inputs are in order.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 5 Feb 2022 16:59:30 +0000 (11:59 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 5 Feb 2022 16:59:30 +0000 (11:59 -0500)
commit46bf1f2dc750de8e620d63f3dc2ad6f569886175
treed462a46b7776c0d807d4d80900a96c35d428868c
parent6d511a463a5e5012292fdeb4c39a1f734c06e823
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
src/backend/executor/nodeMergejoin.c