diff options
author | Robert Haas <rhaas@postgresql.org> | 2015-10-09 14:31:04 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2015-10-09 14:31:04 -0400 |
commit | db0f6cad4884bd4c835156d3a720d9a79dbd63a9 (patch) | |
tree | e16029e0e2a001eb34096daeb3c8100e2afb0a1d /src/backend/storage/ipc/procsignal.c | |
parent | b7aac36245261eba9eb7d18561ce44220b361959 (diff) | |
download | postgresql-db0f6cad4884bd4c835156d3a720d9a79dbd63a9.tar.gz postgresql-db0f6cad4884bd4c835156d3a720d9a79dbd63a9.zip |
Remove set_latch_on_sigusr1 flag.
This flag has proven to be a recipe for bugs, and it doesn't seem like
it can really buy anything in terms of performance. So let's just
*always* set the process latch when we receive SIGUSR1 instead of
trying to do it only when needed.
Per my recent proposal on pgsql-hackers.
Diffstat (limited to 'src/backend/storage/ipc/procsignal.c')
-rw-r--r-- | src/backend/storage/ipc/procsignal.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/backend/storage/ipc/procsignal.c b/src/backend/storage/ipc/procsignal.c index 0abde43565b..acfb4e9be82 100644 --- a/src/backend/storage/ipc/procsignal.c +++ b/src/backend/storage/ipc/procsignal.c @@ -59,14 +59,6 @@ typedef struct */ #define NumProcSignalSlots (MaxBackends + NUM_AUXPROCTYPES) -/* - * If this flag is set, the process latch will be set whenever SIGUSR1 - * is received. This is useful when waiting for a signal from the postmaster. - * Spurious wakeups must be expected. Make sure that the flag is cleared - * in the error path. - */ -bool set_latch_on_sigusr1; - static ProcSignalSlot *ProcSignalSlots = NULL; static volatile ProcSignalSlot *MyProcSignalSlot = NULL; @@ -296,8 +288,7 @@ procsignal_sigusr1_handler(SIGNAL_ARGS) if (CheckProcSignal(PROCSIG_RECOVERY_CONFLICT_BUFFERPIN)) RecoveryConflictInterrupt(PROCSIG_RECOVERY_CONFLICT_BUFFERPIN); - if (set_latch_on_sigusr1) - SetLatch(MyLatch); + SetLatch(MyLatch); latch_sigusr1_handler(); |