aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-04-30 12:21:02 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-04-30 12:21:02 -0400
commit12d11432b4db8a2ae665287e05f0f6868d35545e (patch)
treea4954e6e85ac20a430435a972e439cf4ee422d2c /src
parentc23844212d768b0423859437ca8189b89fd85250 (diff)
downloadpostgresql-12d11432b4db8a2ae665287e05f0f6868d35545e.tar.gz
postgresql-12d11432b4db8a2ae665287e05f0f6868d35545e.zip
Fix possible null pointer dereference or invalid warning message.
Thinko in commit de4389712: 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.
Diffstat (limited to 'src')
-rw-r--r--src/backend/replication/logical/launcher.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/replication/logical/launcher.c b/src/backend/replication/logical/launcher.c
index cf0cb37acc6..f5058d5a9ac 100644
--- a/src/backend/replication/logical/launcher.c
+++ b/src/backend/replication/logical/launcher.c
@@ -315,8 +315,8 @@ retry:
wal_receiver_timeout))
{
elog(WARNING,
- "logical replication worker for subscription \"%d\" took too long to start; canceled",
- worker->subid);
+ "logical replication worker for subscription %u took too long to start; canceled",
+ w->subid);
logicalrep_worker_cleanup(w);
did_cleanup = true;
@@ -347,7 +347,7 @@ retry:
LWLockRelease(LogicalRepWorkerLock);
ereport(WARNING,
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
- errmsg("out of logical replication workers slots"),
+ errmsg("out of logical replication worker slots"),
errhint("You might need to increase max_logical_replication_workers.")));
return;
}
@@ -393,7 +393,7 @@ retry:
{
ereport(WARNING,
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
- errmsg("out of background workers slots"),
+ errmsg("out of background worker slots"),
errhint("You might need to increase max_worker_processes.")));
return;
}