Skip to content

Commit 12d1143

Browse files
committed
Fix possible null pointer dereference or invalid warning message.
Thinko in commit de43897: this warning message references the wrong "LogicalRepWorker *" variable. This would often result in a core dump, but if it didn't, the message would show the wrong subscription OID. In passing, adjust the message text to format a subscription OID similarly to how that's done elsewhere in the function; and fix grammatical issues in some nearby messages. Per Coverity testing.
1 parent c238442 commit 12d1143

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/replication/logical/launcher.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ logicalrep_worker_launch(Oid dbid, Oid subid, const char *subname, Oid userid,
315315
wal_receiver_timeout))
316316
{
317317
elog(WARNING,
318-
"logical replication worker for subscription \"%d\" took too long to start; canceled",
319-
worker->subid);
318+
"logical replication worker for subscription %u took too long to start; canceled",
319+
w->subid);
320320

321321
logicalrep_worker_cleanup(w);
322322
did_cleanup = true;
@@ -347,7 +347,7 @@ logicalrep_worker_launch(Oid dbid, Oid subid, const char *subname, Oid userid,
347347
LWLockRelease(LogicalRepWorkerLock);
348348
ereport(WARNING,
349349
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
350-
errmsg("out of logical replication workers slots"),
350+
errmsg("out of logical replication worker slots"),
351351
errhint("You might need to increase max_logical_replication_workers.")));
352352
return;
353353
}
@@ -393,7 +393,7 @@ logicalrep_worker_launch(Oid dbid, Oid subid, const char *subname, Oid userid,
393393
{
394394
ereport(WARNING,
395395
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
396-
errmsg("out of background workers slots"),
396+
errmsg("out of background worker slots"),
397397
errhint("You might need to increase max_worker_processes.")));
398398
return;
399399
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy