pgsql: Replace many MemSet calls with struct initialization

2022-07-15 Thread Peter Eisentraut
Replace many MemSet calls with struct initialization This replaces all MemSet() calls with struct initialization where that is easily and obviously possible. (For example, some cases have to worry about padding bits, so I left those.) (The same could be done with appropriate memset() calls, but

pgsql: Emulate sigprocmask(), not sigsetmask(), on Windows.

2022-07-15 Thread Thomas Munro
Emulate sigprocmask(), not sigsetmask(), on Windows. Since commit a65e0864, we've required Unix systems to have sigprocmask(). As noted in that commit's message, we were still emulating the historical pre-standard sigsetmask() function in our Windows support code. Emulate standard sigprocmask()

pgsql: Make dsm_impl_posix_resize more future-proof.

2022-07-15 Thread Thomas Munro
Make dsm_impl_posix_resize more future-proof. Commit 4518c798 blocks signals for a short region of code, but it assumed that whatever called it had the signal mask set to UnBlockSig on entry. That may be true today (or may even not be, in extensions in the wild), but it would be better not to mak

pgsql: Make dsm_impl_posix_resize more future-proof.

2022-07-15 Thread Thomas Munro
Make dsm_impl_posix_resize more future-proof. Commit 4518c798 blocks signals for a short region of code, but it assumed that whatever called it had the signal mask set to UnBlockSig on entry. That may be true today (or may even not be, in extensions in the wild), but it would be better not to mak

pgsql: Make dsm_impl_posix_resize more future-proof.

2022-07-15 Thread Thomas Munro
Make dsm_impl_posix_resize more future-proof. Commit 4518c798 blocks signals for a short region of code, but it assumed that whatever called it had the signal mask set to UnBlockSig on entry. That may be true today (or may even not be, in extensions in the wild), but it would be better not to mak

pgsql: Make dsm_impl_posix_resize more future-proof.

2022-07-15 Thread Thomas Munro
Make dsm_impl_posix_resize more future-proof. Commit 4518c798 blocks signals for a short region of code, but it assumed that whatever called it had the signal mask set to UnBlockSig on entry. That may be true today (or may even not be, in extensions in the wild), but it would be better not to mak

pgsql: Make dsm_impl_posix_resize more future-proof.

2022-07-15 Thread Thomas Munro
Make dsm_impl_posix_resize more future-proof. Commit 4518c798 blocks signals for a short region of code, but it assumed that whatever called it had the signal mask set to UnBlockSig on entry. That may be true today (or may even not be, in extensions in the wild), but it would be better not to mak

pgsql: Make dsm_impl_posix_resize more future-proof.

2022-07-15 Thread Thomas Munro
Make dsm_impl_posix_resize more future-proof. Commit 4518c798 blocks signals for a short region of code, but it assumed that whatever called it had the signal mask set to UnBlockSig on entry. That may be true today (or may even not be, in extensions in the wild), but it would be better not to mak

pgsql: Make dsm_impl_posix_resize more future-proof.

2022-07-15 Thread Thomas Munro
Make dsm_impl_posix_resize more future-proof. Commit 4518c798 blocks signals for a short region of code, but it assumed that whatever called it had the signal mask set to UnBlockSig on entry. That may be true today (or may even not be, in extensions in the wild), but it would be better not to mak

pgsql: Log details for client certificate failures

2022-07-15 Thread Peter Eisentraut
Log details for client certificate failures Currently, debugging client certificate verification failures is mostly limited to looking at the TLS alert code on the client side. For simple deployments, sometimes it's enough to see "sslv3 alert certificate revoked" and know exactly what needs to be

pgsql: Convert macros to static inline functions (xlog_internal.h)

2022-07-15 Thread Peter Eisentraut
Convert macros to static inline functions (xlog_internal.h) Reviewed-by: Amul Sul Discussion: https://www.postgresql.org/message-id/flat/5b558da8-99fb-0a99-83dd-f72f05388517%40enterprisedb.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/507ba16b28c724046551ef8

pgsql: Support gcc -fkeep-inline-functions

2022-07-15 Thread Peter Eisentraut
Support gcc -fkeep-inline-functions For some systems, we need to avoid unsatisfied-external-reference errors in static inlines. See 27d2693187d1bcf2563ee7142ba37d4788c8d52b for example. In order to test that on other systems, the gcc option -fkeep-inline-functions can be used. But it actually i