From 6e9723cde5c672bb55ed803fc42720d0a46ce03c 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 186057bd932..d8ff8664fb6 100644 --- a/src/backend/replication/logical/launcher.c +++ b/src/backend/replication/logical/launcher.c @@ -716,8 +716,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