| From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: pg_dump: check for _beginthreadex() failure in parallel dump |
| Date: | 2026-07-07 15:24:57 |
| Message-ID: | E1wh7fM-0000i4-1o@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
pg_dump: check for _beginthreadex() failure in parallel dump
ParallelBackupStart() stored _beginthreadex()'s return value as the
worker's thread handle without checking it. On failure that value is 0,
which would later reach WaitForMultipleObjects() as a null handle, caught
only by an Assert. The fork() path already calls pg_fatal() when it
fails; do the same for _beginthreadex(), as pgbench does.
Author: Bryan Green <dbryan(dot)green(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/8c712d76-ecf7-4749-a6d8-dddc01f298ec@gmail.com
Backpatch-through: 14
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/75e201bf95d8825f1c025792eed0f13d65657c5d
Modified Files
--------------
src/bin/pg_dump/parallel.c | 2 ++
1 file changed, 2 insertions(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Gustafsson | 2026-07-07 15:38:04 | pgsql: Replace hardcoded mentions of pg_hosts.conf with GUC |
| Previous Message | Daniel Gustafsson | 2026-07-07 13:57:24 | pgsql: doc: Add reference to CREATE PROCEDURE on CREATE FUNCTION |