postgresql/src/backend
Tom Lane 55d9cd46f6 Avoid misbehavior when hash_table_bytes < bucket_size.
It's possible to reach this case when work_mem is very small and tupsize
is (relatively) very large.  In that case ExecChooseHashTableSize would
get an assertion failure, or with asserts off it'd compute nbuckets = 0,
which'd likely cause misbehavior later (I've not checked).  To fix,
clamp the number of buckets to be at least 1.

This is due to faulty conversion of old my_log2() coding in 28d936031.
Back-patch to v13, as that was.

Zhang Mingli

Discussion: https://postgr.es/m/beb64ca0-91e2-44ac-bf4a-7ea36275ec02@Spark
2022-08-13 17:00:32 -04:00
..
access Move basebackup code to new directory src/backend/backup 2022-08-10 14:03:23 -04:00
backup Move basebackup code to new directory src/backend/backup 2022-08-10 14:03:23 -04:00
bootstrap Process session_preload_libraries within InitPostgres's transaction. 2022-07-25 10:27:43 -04:00
catalog In extensions, don't replace objects not belonging to the extension. 2022-08-08 11:12:31 -04:00
commands Avoid using a fake relcache entry to own an SmgrRelation. 2022-08-12 08:25:41 -04:00
executor Avoid misbehavior when hash_table_bytes < bucket_size. 2022-08-13 17:00:32 -04:00
foreign Create routine able to set single-call SRFs for Materialize mode 2022-03-07 10:26:29 +09:00
jit Improve performance of ORDER BY / DISTINCT aggregates 2022-08-02 23:11:45 +12:00
lib Fix lock assertions in dshash.c. 2022-07-11 16:43:29 +12:00
libpq Remove HAVE_UNIX_SOCKETS. 2022-08-14 08:46:53 +12:00
main windows: Remove HAVE_MINIDUMP_TYPE test 2022-08-07 09:36:01 -07:00
nodes Add missing fields to _outConstraint() 2022-08-13 10:32:38 +02:00
optimizer Fix failure to set correct operator in window run condition 2022-08-05 10:14:00 +12:00
parser Catch stack overflow when recursing in transformFromClauseItem(). 2022-08-13 15:21:28 -04:00
partitioning Have ExecFindPartition cache the last found partition 2022-08-02 09:55:27 +12:00
po NLS: Put list of available languages into LINGUAS files 2022-07-13 08:19:17 +02:00
port Remove configure probes for sys/ipc.h, sys/sem.h, sys/shm.h. 2022-08-14 00:09:47 +12:00
postmaster Remove HAVE_UNIX_SOCKETS. 2022-08-14 08:46:53 +12:00
regex Remove redundant null pointer checks before free() 2022-07-03 11:47:15 +02:00
replication struct PQWalReceiverFunctions: use designated initializers 2022-08-11 12:07:05 +02:00
rewrite Replace many MemSet calls with struct initialization 2022-07-16 08:50:49 +02:00
snowball Move snowball_create.sql creation into perl file 2022-07-18 12:24:27 -07:00
statistics Partially undo commit 94da73281. 2022-08-05 15:57:46 -04:00
storage Remove configure probe for sys/resource.h and refactor. 2022-08-14 00:09:47 +12:00
tcop Remove configure probe for sys/resource.h and refactor. 2022-08-14 00:09:47 +12:00
tsearch Invent qsort_interruptible(). 2022-07-12 16:30:36 -04:00
utils Remove HAVE_UNIX_SOCKETS. 2022-08-14 08:46:53 +12:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Move basebackup code to new directory src/backend/backup 2022-08-10 14:03:23 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk NLS: Put list of available languages into LINGUAS files 2022-07-13 08:19:17 +02:00