postgresql/src/backend
Richard Guo 5668a857de Fix right-semi-joins in HashJoin rescans
When resetting a HashJoin node for rescans, if it is a single-batch
join and there are no parameter changes for the inner subnode, we can
just reuse the existing hash table without rebuilding it.  However,
for join types that depend on the inner-tuple match flags in the hash
table, we need to reset these match flags to avoid incorrect results.
This applies to right, right-anti, right-semi, and full joins.

When I introduced "Right Semi Join" plan shapes in aa86129e1, I failed
to reset the match flags in the hash table for right-semi joins in
rescans.  This oversight has been shown to produce incorrect results.
This patch fixes it.

Author: Richard Guo
Discussion: https://postgr.es/m/CAMbWs4-nQF9io2WL2SkD0eXvfPdyBc9Q=hRwfQHCGV2usa0jyA@mail.gmail.com
2024-12-09 20:36:23 +09:00
..
access Comment fix: "buffer context lock" to "buffer content lock". 2024-12-06 09:59:12 -08:00
archive Apply more quoting to GUC names in messages 2024-09-04 13:50:44 +09:00
backup Clean up newlines following left parentheses 2024-11-26 17:10:07 +01:00
bootstrap Provide a better error message for misplaced dispatch options. 2024-12-04 15:04:15 -06:00
catalog Make getObjectDescription robust against dangling amproc type links. 2024-12-07 14:28:16 -05:00
commands Ensure that pg_amop/amproc entries depend on their lefttype/righttype. 2024-12-07 15:56:28 -05:00
executor Fix right-semi-joins in HashJoin rescans 2024-12-09 20:36:23 +09:00
foreign Improve style of two code paths 2024-10-08 10:51:20 +09:00
jit Require sizeof(bool) == 1. 2024-11-28 12:01:14 +13:00
lib Revert pg_wal_replay_wait() stored procedure 2024-11-04 22:47:57 +02:00
libpq Deprecate MD5 passwords. 2024-12-02 13:30:07 -06:00
main Provide a better error message for misplaced dispatch options. 2024-12-04 15:04:15 -06:00
nodes Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
optimizer Avoid mislabeling of lateral references, redux. 2024-11-30 12:42:19 -05:00
parser Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
partitioning Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
po Translation updates 2024-06-24 13:11:27 +02:00
port Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
postmaster Provide a better error message for misplaced dispatch options. 2024-12-04 15:04:15 -06:00
regex Remove pg_regex_collation 2024-12-05 07:19:37 +01:00
replication Fix memory leak in pgoutput with publication list cache 2024-12-09 16:41:46 +09:00
rewrite Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
snowball Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
statistics Disallow modifying statistics on system columns. 2024-11-22 12:40:24 -08:00
storage Remove useless casts to (const void *) 2024-12-06 18:49:01 +01:00
tcop Provide a better error message for misplaced dispatch options. 2024-12-04 15:04:15 -06:00
tsearch Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
utils Improve comment about dropped entries in pgstat.c 2024-12-09 14:35:39 +09:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile Fix make build on MinGW 2024-06-21 08:17:23 +02:00
meson.build meson: Fix import library name in Windows 2024-06-20 09:08:36 +02:00
nls.mk Add missing gettext triggers 2024-05-14 12:57:22 +02:00