From 79718c1c6c007c27e9c1b8e92bd96d17067606fa Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Mon, 28 Jun 2021 12:11:18 +0900 Subject: [PATCH] Fix variable initialization with ALTER SUBSCRIPTION DROP PUBLICATION copy_data is not a supported option with this sub-command of ALTER SUBSCRIPTION, which would not make a variable related to it initialized after parsing the option set in DefElems. A refresh could then refer to it. Author: Ranier Vilela Reviewed-by: Peter Smith Discussion: https://postgr.es/m/CAEudQAp5P8nr=ze2Gv=BMj=DJFZnrvendZCZcC-fos3QiDe2sg@mail.gmail.com --- src/backend/commands/subscriptioncmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index e9a97db9a55..b862e59f1da 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -949,7 +949,7 @@ AlterSubscription(AlterSubscriptionStmt *stmt, bool isTopLevel) case ALTER_SUBSCRIPTION_DROP_PUBLICATION: { bool isadd = stmt->kind == ALTER_SUBSCRIPTION_ADD_PUBLICATION; - bool copy_data; + bool copy_data = false; bool refresh; List *publist; -- 2.39.5