aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-10-05 15:31:06 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-10-05 15:31:06 +0300
commitf9ecb57a506ada358baa19287d2c438ad01cdbce (patch)
tree1570ea0f8257f0bb1920e761ed7e6776547bc26f /src
parent094ae071605d938c46b440b4c27b11f73a241422 (diff)
downloadpostgresql-f9ecb57a506ada358baa19287d2c438ad01cdbce.tar.gz
postgresql-f9ecb57a506ada358baa19287d2c438ad01cdbce.zip
Clean up WaitLatch calls that passed latch without WL_LATCH_SET
The 'latch' argument is ignored if WL_LATCH_SET is not given. Clarify these calls by not pointlessly passing MyLatch. Discussion: https://www.postgresql.org/message-id/391abe21-413e-4d91-a650-b663af49500c@iki.fi
Diffstat (limited to 'src')
-rw-r--r--src/backend/libpq/be-secure-gssapi.c4
-rw-r--r--src/backend/libpq/be-secure-openssl.c2
-rw-r--r--src/backend/postmaster/walsummarizer.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/libpq/be-secure-gssapi.c b/src/backend/libpq/be-secure-gssapi.c
index 483636503c1..2d36c76324a 100644
--- a/src/backend/libpq/be-secure-gssapi.c
+++ b/src/backend/libpq/be-secure-gssapi.c
@@ -450,7 +450,7 @@ read_or_wait(Port *port, ssize_t len)
*/
if (ret <= 0)
{
- WaitLatchOrSocket(MyLatch,
+ WaitLatchOrSocket(NULL,
WL_SOCKET_READABLE | WL_EXIT_ON_PM_DEATH,
port->sock, 0, WAIT_EVENT_GSS_OPEN_SERVER);
@@ -668,7 +668,7 @@ secure_open_gssapi(Port *port)
/* Wait and retry if we couldn't write yet */
if (ret <= 0)
{
- WaitLatchOrSocket(MyLatch,
+ WaitLatchOrSocket(NULL,
WL_SOCKET_WRITEABLE | WL_EXIT_ON_PM_DEATH,
port->sock, 0, WAIT_EVENT_GSS_OPEN_SERVER);
continue;
diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c
index 8ec78c83304..e810be03bd3 100644
--- a/src/backend/libpq/be-secure-openssl.c
+++ b/src/backend/libpq/be-secure-openssl.c
@@ -506,7 +506,7 @@ aloop:
else
waitfor = WL_SOCKET_WRITEABLE | WL_EXIT_ON_PM_DEATH;
- (void) WaitLatchOrSocket(MyLatch, waitfor, port->sock, 0,
+ (void) WaitLatchOrSocket(NULL, waitfor, port->sock, 0,
WAIT_EVENT_SSL_OPEN_SERVER);
goto aloop;
case SSL_ERROR_SYSCALL:
diff --git a/src/backend/postmaster/walsummarizer.c b/src/backend/postmaster/walsummarizer.c
index c1bf4a70dd1..ee6f1afc9af 100644
--- a/src/backend/postmaster/walsummarizer.c
+++ b/src/backend/postmaster/walsummarizer.c
@@ -315,7 +315,7 @@ WalSummarizerMain(char *startup_data, size_t startup_data_len)
* So a really fast retry time doesn't seem to be especially
* beneficial, and it will clutter the logs.
*/
- (void) WaitLatch(MyLatch,
+ (void) WaitLatch(NULL,
WL_TIMEOUT | WL_EXIT_ON_PM_DEATH,
10000,
WAIT_EVENT_WAL_SUMMARIZER_ERROR);