Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nqWx0-0000gG-Eq for pgsql-hackers@arkaria.postgresql.org; Mon, 16 May 2022 09:23:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nqWwy-0002k3-BR for pgsql-hackers@arkaria.postgresql.org; Mon, 16 May 2022 09:23:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nqWwx-0002Zv-TC for pgsql-hackers@lists.postgresql.org; Mon, 16 May 2022 09:23:36 +0000 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nqWwu-0005xu-9B for pgsql-hackers@lists.postgresql.org; Mon, 16 May 2022 09:23:33 +0000 Received: by mail-qt1-x832.google.com with SMTP id hh4so11590406qtb.10 for ; Mon, 16 May 2022 02:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ry3z6TxQCjltwYxwwQ4ZE1nerWudOfeStBhNzllMFfM=; b=FhyT8D55B42F9Qg/2eIiPkZOOd0DTIrKbkuQ8ngkJC7hRkXpp5oVbW6Pyw/csD+g71 SasmlnRT175X/n4Gt2Pa8+rhocuQAAn0ZwVqgKPdLh2iwR6PBIgfmbAPs9sMLZE+zzEC 1WZ9m8UTMBnYEYL9cB/wjoOBVMw1XZJFisGSrGe1U2MATFCCXg6aVB+nvUiPhCikfZmD kGdpaQ2aYk2Pue1lebdN39D4jWoGgRNArAmbVEglQ6WGqDh4Y5Ctzof3BzxPkTJ4hjIQ 3fMtTxk8vY3UbP77+5MNviNbvRIbr4ck/RBKpOMxX3mt7Ch1E3GFuvQ86Qol6kUgFfu5 WHCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ry3z6TxQCjltwYxwwQ4ZE1nerWudOfeStBhNzllMFfM=; b=5K+wrD6+QQBaq6MzF6DfjG4JXOjV7gRVj5l6++UrRtMBhLyPTXgDzwJ91JshkVNDo4 GSVeMYze14UurJg/2rhdxp9MZxsxTu+xWvMIHaMgszZ+SYAlnfrbjv0v8lOY+JSI1CKR 4nJkZf6V8U36Ow1Ws29BotRD8hNOkPE6aJeJk+s0F67NNLjABxUMcsNhlA3Oa2WYXgDN 0TKfCMNuD1Kh937vCTnI3KU7RpSyXwKZ+qJPLDOnQXiMvzWsIyGKUXOVyVkYOMi+t2h/ WaiEkhqJg+AK2Ne5X2eqk1HKdEMqf1clCWSuwOOACQRILDVWx8ziZyKHOIj5xxYFa0IV Mrvw== X-Gm-Message-State: AOAM530H1ytbVGEFa2Fiw1Ic6s/2/Xw49N/EHmJsWbHckXAiBdNG8gSk zs/fd2o+ObUoTt388XK2HIOHNPPM5nq9RM6Mcaw= X-Google-Smtp-Source: ABdhPJxhP05S9vNzqcYRu1nQ6ryrahH3v2Q3uBXpJ6mQEXo/5P/rRy4R0fIEwL5yku6iQLD/VVmV9upM6e9qMvHxkd4= X-Received: by 2002:ac8:57c8:0:b0:2f3:bdc8:ede5 with SMTP id w8-20020ac857c8000000b002f3bdc8ede5mr14135444qta.458.1652693011251; Mon, 16 May 2022 02:23:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Peter Smith Date: Mon, 16 May 2022 19:23:14 +1000 Message-ID: Subject: Re: Skipping schema changes in publication To: vignesh C Cc: Amit Kapila , Bharath Rupireddy , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Below are my review comments for v5-0001. There is some overlap with comments recently posted by Osumi-san [1]. (I also have review comments for v5-0002; will post them tomorrow) ====== 1. Commit message This patch adds a new RESET clause to ALTER PUBLICATION which will reset the publication to default state which includes resetting the publication options, setting ALL TABLES option to false and dropping the relations and schemas that are associated with the publication. SUGGEST "to default state" -> "to the default state" "ALL TABLES option" -> "ALL TABLES flag" ~~~ 2. doc/src/sgml/ref/alter_publication.sgml + + The RESET clause will reset the publication to the + default state which includes resetting the publication options, setting + ALL TABLES option to false and + dropping all relations and schemas that are associated with the publication. "ALL TABLES option" -> "ALL TABLES flag" ~~~ 3. doc/src/sgml/ref/alter_publication.sgml + invoking user to be a superuser. RESET of publication + requires the invoking user to be a superuser. To alter the owner, you must SUGGESTION To RESET a publication requires the invoking user to be a superuser. ~~~ 4. src/backend/commands/publicationcmds.c @@ -53,6 +53,13 @@ #include "utils/syscache.h" #include "utils/varlena.h" +#define PUB_ATION_INSERT_DEFAULT true +#define PUB_ACTION_UPDATE_DEFAULT true +#define PUB_ACTION_DELETE_DEFAULT true +#define PUB_ACTION_TRUNCATE_DEFAULT true +#define PUB_VIA_ROOT_DEFAULT false +#define PUB_ALL_TABLES_DEFAULT false 4a. Typo: "ATION" -> "ACTION" 4b. I think these #defines deserve a 1 line comment. e.g. /* CREATE PUBLICATION default values for flags and options */ 4c. Since the "_DEFAULT" is a common part of all the names, maybe it is tidier if it comes first. e.g. #define PUB_DEFAULT_ACTION_INSERT true #define PUB_DEFAULT_ACTION_UPDATE true #define PUB_DEFAULT_ACTION_DELETE true #define PUB_DEFAULT_ACTION_TRUNCATE true #define PUB_DEFAULT_VIA_ROOT false #define PUB_DEFAULT_ALL_TABLES false ------ [1] https://www.postgresql.org/message-id/TYCPR01MB8373C3120C2B3112001ED6F1EDCF9%40TYCPR01MB8373.jpnprd01.prod.outlook.com Kind Regards, Peter Smith. Fujitsu Australia