Re: Small miscellaneous fixes

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Ranier Vilela <ranier.vf@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2022-11-16T06:59:33Z
Lists: pgsql-hackers
On Tue, Oct 04, 2022 at 08:23:16AM -0300, Ranier Vilela wrote:
> Both are correct, I missed the pqsignal calls.
> 
> Attached patch to change this.

The change for pgbench is missing and this is only changing
pg_test_fsync.  Switching to sig_atomic_t would be fine on non-WIN32
as these are used in signal handlers, but are we sure that this is
fine on WIN32 for pg_test_fsync where we rely on a separate thread to
control the timing of the alarm?
--
Michael

Commits

  1. Mark two signal flags as sig_atomic_t in pgbench and pg_test_fsync

  2. Cleanup useless assignments and checks

  3. Mark sigint_interrupt_enabled as sig_atomic_t

  4. Refactor creation of backup_label and backup history files