0001-Remove-unused-latch.patch
text/x-patch
Filename: 0001-Remove-unused-latch.patch
Type: text/x-patch
Part: 0
Message:
Re: Interrupts vs signals
Patch
Format: format-patch
Series: patch 0001
Subject: Remove unused latch
| File | + | − |
|---|---|---|
| src/backend/replication/walsender.c | 0 | 3 |
| src/include/replication/walsender_private.h | 0 | 7 |
From 48179fe6792de431c4c6234ce8a009e8baa86e47 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas <heikki.linnakangas@iki.fi> Date: Sat, 24 Aug 2024 01:04:21 +0300 Subject: [PATCH 01/11] Remove unused latch It was left unused by commit bc971f4025, which replaced the latch usage with a condition variable --- src/backend/replication/walsender.c | 3 --- src/include/replication/walsender_private.h | 7 ------- 2 files changed, 10 deletions(-) diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index c5f1009f37..866b69ec85 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -2935,7 +2935,6 @@ InitWalSenderSlot(void) walsnd->flushLag = -1; walsnd->applyLag = -1; walsnd->sync_standby_priority = 0; - walsnd->latch = &MyProc->procLatch; walsnd->replyTime = 0; /* @@ -2979,8 +2978,6 @@ WalSndKill(int code, Datum arg) MyWalSnd = NULL; SpinLockAcquire(&walsnd->mutex); - /* clear latch while holding the spinlock, so it can safely be read */ - walsnd->latch = NULL; /* Mark WalSnd struct as no longer being in use. */ walsnd->pid = 0; SpinLockRelease(&walsnd->mutex); diff --git a/src/include/replication/walsender_private.h b/src/include/replication/walsender_private.h index cf32ac2488..41ac736b95 100644 --- a/src/include/replication/walsender_private.h +++ b/src/include/replication/walsender_private.h @@ -18,7 +18,6 @@ #include "nodes/replnodes.h" #include "replication/syncrep.h" #include "storage/condition_variable.h" -#include "storage/latch.h" #include "storage/shmem.h" #include "storage/spin.h" @@ -71,12 +70,6 @@ typedef struct WalSnd /* Protects shared variables in this structure. */ slock_t mutex; - /* - * Pointer to the walsender's latch. Used by backends to wake up this - * walsender when it has work to do. NULL if the walsender isn't active. - */ - Latch *latch; - /* * Timestamp of the last message received from standby. */ -- 2.39.2