From e5c071bc0f93c9c47821c876e36459580e08a68c Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Wed, 12 May 2021 19:13:54 -0400 Subject: Rename the logical replication global "wrconn" The worker.c global wrconn is only meant to be used by logical apply/ tablesync workers, but there are other variables with the same name. To reduce future confusion rename the global from "wrconn" to "LogRepWorkerWalRcvConn". While this is just cosmetic, it seems better to backpatch it all the way back to 10 where this code appeared, to avoid future backpatching issues. Author: Peter Smith Discussion: https://postgr.es/m/CAHut+Pu7Jv9L2BOEx_Z0UtJxfDevQSAUW2mJqWU+CtmDrEZVAg@mail.gmail.com --- src/backend/replication/logical/launcher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/replication/logical/launcher.c') diff --git a/src/backend/replication/logical/launcher.c b/src/backend/replication/logical/launcher.c index ff985b9b24c..0a34d269859 100644 --- a/src/backend/replication/logical/launcher.c +++ b/src/backend/replication/logical/launcher.c @@ -704,8 +704,8 @@ static void logicalrep_worker_onexit(int code, Datum arg) { /* Disconnect gracefully from the remote side. */ - if (wrconn) - walrcv_disconnect(wrconn); + if (LogRepWorkerWalRcvConn) + walrcv_disconnect(LogRepWorkerWalRcvConn); logicalrep_worker_detach(); -- cgit v1.2.3