aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-10-05 15:09:27 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-10-05 15:09:27 +0300
commit6c0c49f7d37dc29775947ac6edbc494c32f43fa6 (patch)
treeb2dbfcdfbe548c9514cb86990aa0f6a2bf327356 /src
parentadbb27ac89e07cfbd94ea07a53930addfc3895ee (diff)
downloadpostgresql-6c0c49f7d37dc29775947ac6edbc494c32f43fa6.tar.gz
postgresql-6c0c49f7d37dc29775947ac6edbc494c32f43fa6.zip
Remove unused latch
It was left unused by commit bc971f4025, which replaced the latch usage with a condition variable Discussion: https://www.postgresql.org/message-id/391abe21-413e-4d91-a650-b663af49500c@iki.fi
Diffstat (limited to 'src')
-rw-r--r--src/backend/replication/walsender.c3
-rw-r--r--src/include/replication/walsender_private.h7
2 files changed, 0 insertions, 10 deletions
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index c5f1009f370..866b69ec855 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 cf32ac2488a..41ac736b953 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"
@@ -72,12 +71,6 @@ typedef struct WalSnd
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.
*/
TimestampTz replyTime;