Re: pg_threads.h take II

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Bryan Green <dbryan(dot)green(at)gmail(dot)com>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Jelte Fennema <postgres(at)jeltef(dot)nl>
Subject: Re: pg_threads.h take II
Date: 2026-07-31 02:18:09
Message-ID: CA+hUKGJvLYGy-bxf1YhBu7XQ8x6U-D7PxkCB_h-y2ObbdjPP6w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I decided to split the API patch into two parts, to highlight
something interesting:

v3-0002 pg_threads.h with support for <pthread.h> or <threads.h>
v3-0003 adds <windows.h> option for native Windows API

If we are ready to make <threads.h> a hard requirement for Visual
Studio builds, and willing to use the <pthread.h> implementation that
ships with MinGW, then we don't actually need v3-0003. That means
that we're left with almost no code, mostly just renaming wrappers and
comments.

CI passes with or without v3-0003.

I also fixed the commit message for v3-0006 which I'd failed to update
(I abandoned my thread-exit invention and just went with tss_t in the
end). No other changes from v2.

Attachment Content-Type Size
v3-0001-ecpg-Fix-auto_mem-cleanup-on-thread-exit.patch text/x-patch 2.2 KB
v3-0002-port-Provide-pg_threads.h-API.patch text/x-patch 52.0 KB
v3-0003-port-Native-Windows-mapping-for-pg_threads.h.patch text/x-patch 24.9 KB
v3-0004-port-Use-pg_threads.h-API-for-pg_localconv_r.patch text/x-patch 1.6 KB
v3-0005-ecpg-Improve-variable-name.patch text/x-patch 2.5 KB
v3-0006-ecpg-Use-pg_threads.h.patch text/x-patch 53.2 KB
v3-0007-pgbench-Use-pg_threads.h.patch text/x-patch 13.9 KB
v3-0008-libpq-Use-pg_threads.h.patch text/x-patch 11.6 KB
v3-0009-pg_basebackup-Use-pg_threads.h.patch text/x-patch 12.4 KB
v3-0010-pg_signal_processor-Infrastructure-for-cleanup.patch text/x-patch 7.9 KB
v3-0011-fe_utils-Provide-cancel_set-for-fast-quit-paths.patch text/x-patch 6.2 KB
v3-0012-XXX-pg_dump-Refactor-to-use-threads-on-all-platfo.patch text/x-patch 46.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-07-31 02:36:59 Re: Support for 8-byte TOAST values, round two
Previous Message Hayato Kuroda (Fujitsu) 2026-07-31 02:10:26 RE: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server