1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Adjust overstrong nbtree skip array assertion.

Make an nbtree array preprocessing assertion account for scans that add
fewer skip arrays than initially expected due to preprocessing finding
an unsatisfiable array qual.

Oversight in commit 92fe23d9.

Author: Peter Geoghegan <pg@bowt.ie>
Reported-By: Mark Dilger <mark.dilger@enterprisedb.com>
Discussion: https://postgr.es/m/CAHgHdKtQMhHy5qcB3KqCcGiW-Rp8P7KzUFRa9ZMKUiv6zen7LQ@mail.gmail.com
This commit is contained in:
Peter Geoghegan
2025-04-30 23:15:51 -04:00
parent 92ee8a4df5
commit 9d924dbb37

View File

@ -1856,7 +1856,7 @@ _bt_preprocess_array_keys(IndexScanDesc scan, int *new_numberOfKeys)
numArrayKeyData++; /* keep this scan key/array */
}
Assert(numSkipArrayKeys == 0);
Assert(numSkipArrayKeys == 0 || !so->qual_ok);
/* Set final number of equality-type array keys */
so->numArrayKeys = numArrayKeys;