postgresql/src/backend/access
Peter Geoghegan 480bc6e3ed Remove unneeded nbtree array preprocessing assert.
Certain cases involving the use of cursors had assertion failures within
_bt_preprocess_keys's recently added no-op return path.  The assertion
in question made the faulty assumption that a second or third call to
_bt_preprocess_keys (within the same btrescan) could only happen when
another scheduled primitive index scan was just about to begin.

It would be possible to address the problem by only allowing scans that
have array keys to take the new no-op path, forcing affected cases to
perform redundant preprocessing work.  It seems simpler to just remove
the assertion, and reframe the no-op path as a more general mechanism.
Take this simpler approach.

The important underlying principle is that we only need to perform
preprocessing once per btrescan (at most).  This is expected regardless
of whether or not the scan happens to have array keys.

Oversight in commit 1b134ca5, which enhanced nbtree ScalarArrayOp
execution.

Reported-By: Alexander Lakhin <exclusion@gmail.com>
Discussion: https://postgr.es/m/ef0f7c8b-a6fa-362e-6fd6-054950f947ca@gmail.com
2024-04-22 13:58:06 -04:00
..
brin Add missing index_insert_cleanup calls 2024-04-19 16:08:34 +02:00
common Revert: Custom reloptions for table AM 2024-04-11 15:46:35 +03:00
gin Fix typos and duplicate words 2024-04-18 21:28:07 +02:00
gist Merge prune, freeze and vacuum WAL record formats 2024-03-25 14:59:58 +02:00
hash Fix inconsistency with replay of hash squeeze record for clean buffers 2024-04-11 09:20:51 +09:00
heap Fix typos and duplicate words 2024-04-18 21:28:07 +02:00
index Add missing index_insert_cleanup calls 2024-04-19 16:08:34 +02:00
nbtree Remove unneeded nbtree array preprocessing assert. 2024-04-22 13:58:06 -04:00
rmgrdesc Fix typos and duplicate words 2024-04-18 21:28:07 +02:00
sequence Fix comment thinko in sequence.c 2024-02-27 08:19:39 +09:00
spgist Make the order of the header file includes consistent 2024-03-13 15:07:00 +01:00
table revert: Generalize relation analyze in table AM interface 2024-04-16 13:14:20 +03:00
tablesample Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
transam Refactoring for CommitTransactionCommand()/AbortCurrentTransaction() 2024-04-18 00:29:53 +03:00
Makefile Introduce sequence_*() access functions 2024-02-26 16:04:59 +09:00
meson.build Introduce sequence_*() access functions 2024-02-26 16:04:59 +09:00