[BUG] Crash on pgbench initialization.
Anton A. Melnikov <aamelnikov@inbox.ru>
From: "Anton A. Melnikov" <aamelnikov@inbox.ru>
To: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2023-07-23T20:21:47Z
Lists: pgsql-hackers
Attachments
- bt.txt (text/plain)
- v1-0001-nonzero-from-LimitAdditionalPins.patch (text/x-patch) patch v1-0001
Hello! My colleague Victoria Shepard reported that pgbench might crash during initialization with some values of shared_buffers and max_worker_processes in conf. After some research, found this happens when the LimitAdditionalPins() returns exactly zero. In the current master, this will happen e.g. if shared_buffers = 10MB and max_worker_processes = 40. Then the command "pgbench --initialize postgres" will lead to crash. See the backtrace attached. There is a fix in the patch applied. Please take a look on it. With the best regards, -- Anton A. Melnikov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company
Commits
-
Fix off-by-one in LimitAdditionalPins()
- bd2f46c6559d 16.0 landed
- f3bc5192889f 17.0 landed