postgresql/src/backend/access
Thomas Munro d34aa0a2f4 Fix race in SSI interaction with gin fast path.
The ginfast.c code previously checked for conflicts in before locking
the relevant buffer, leaving a window where a RW conflict could be
missed.  Re-order.

There was also a place where buffer ID and block number were confused
while trying to predicate-lock a page, noted by visual inspection.

Back-patch to all supported releases.  Fixes one more problem discovered
with the reproducer from bug #17949, in this case when Dmitry tried
other index types.

Reported-by: Artem Anisimov <artem.anisimov.255@gmail.com>
Reported-by: Dmitry Dolgov <9erthalion6@gmail.com>
Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Discussion: https://postgr.es/m/17949-a0f17035294a55e2%40postgresql.org
2023-07-04 09:10:37 +12:00
..
brin Fix handling of empty ranges and NULLs in BRIN 2023-05-19 00:15:13 +02:00
common Fix custom validators call in build_local_reloptions() 2023-04-23 14:00:06 +03:00
gin Fix race in SSI interaction with gin fast path. 2023-07-04 09:10:37 +12:00
gist Fix dereference of dangling pointer in GiST index buffering build. 2023-03-29 11:31:30 -04:00
hash Fix memory leak for hashing with nondeterministic collations. 2022-12-01 11:55:59 -08:00
heap Fix race in SSI interaction with bitmap heap scan. 2023-07-04 09:10:37 +12:00
index Update copyright for 2022 2022-01-07 19:04:57 -05:00
nbtree Fix race in SSI interaction with empty btrees. 2023-07-04 09:10:37 +12:00
rmgrdesc Fix assert in logicalmsg_desc 2022-08-17 00:13:42 +02:00
spgist Fix typos in comments, code and documentation 2023-01-03 16:26:27 +09:00
table Remove extraneous blank lines before block-closing braces 2022-04-13 19:16:02 +02:00
tablesample Update copyright for 2022 2022-01-07 19:04:57 -05:00
transam Silence "missing contrecord" error. 2023-07-03 11:22:10 +12:00
Makefile Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00