bugfix_v1.patch

text/x-diff

Filename: bugfix_v1.patch
Type: text/x-diff
Part: 0
Message: Bug: walsender and high CPU usage

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
Series: patch v1
File+
src/backend/replication/walsender.c 3 0
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index 3497269..35c7042 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -700,6 +700,9 @@ WalSndLoop(void)
 	/* Loop forever, unless we get an error */
 	for (;;)
 	{
+		/* Clear any already-pending wakeups */
+		ResetLatch(&MyWalSnd->latch);
+
 		/*
 		 * Emergency bailout if postmaster has died.  This is to avoid the
 		 * necessity for manual cleanup of all postmaster children.