postgres/src
Peter Geoghegan 0f08df4068 Avoid treating nonrequired nbtree keys as required.
Consistently prevent nbtree array advancement from treating a scankey as
required when operating in pstate.forcenonrequired mode.  Otherwise, we
risk a NULL pointer dereference.  This was possible in the path where
_bt_check_compare is called to recheck a tuple that advanced all of the
scan's arrays to matching values: its continuescan=false handling
expects _bt_advance_array_keys to have been called with a valid pstate,
but it'll always be NULL during sktrig_required=false calls (which is
how _bt_advance_array_keys must be called when pstate.forcenonrequired).

Oversight in commit 8a510275, which optimized nbtree search scan key
comparisons.

Author: Peter Geoghegan <pg@bowt.ie>
Reported-By: Mark Dilger <mark.dilger@enterprisedb.com>
Discussion: https://postgr.es/m/CAHgHdKsn2W=gPBmj7p6MjQFvxB+zZDBkwTSg0o3f5Hh8rkRrsA@mail.gmail.com
Discussion: https://postgr.es/m/CAH2-WzmodSE+gpTd1CRGU9ez8ytyyDS+Kns2r9NzgUp1s56kpw@mail.gmail.com
2025-05-02 17:50:58 -04:00
..
backend Avoid treating nonrequired nbtree keys as required. 2025-05-02 17:50:58 -04:00
bin vacuumdb: Don't skip empty relations in --missing-stats-only mode. 2025-04-30 14:12:59 -05:00
common Fix INITCAP() word boundaries for PG_UNICODE_FAST. 2025-04-21 12:34:58 -07:00
fe_utils Fix incorrect format placeholders 2025-04-25 16:49:30 +02:00
include Remove circular #include's between wait_event.h and wait_event_types.h 2025-04-28 09:08:15 +09:00
interfaces oauth: Correct SSL dependency for libpq-oauth.a 2025-05-02 10:45:12 -07:00
makefiles oauth: Move the builtin flow into a separate module 2025-05-01 09:14:30 -07:00
pl Don't use double-quotes in #include's of system headers, redux. 2025-04-27 13:23:19 -04:00
port Match parameter in new function to earlier equivalents 2025-04-27 03:03:52 +07:00
template
test Handle self-referencing FKs correctly in partitioned tables 2025-05-02 21:25:50 +02:00
timezone Update time zone data files to tzdata release 2025b. 2025-04-30 11:13:49 -04:00
tools pg_restore cleanups 2025-04-16 12:04:34 -04:00
tutorial Doc: simplify the tutorial's window-function examples. 2025-01-21 14:43:21 -05:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in oauth: Move the builtin flow into a separate module 2025-05-01 09:14:30 -07:00
Makefile.shlib
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls-global.mk