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 1nx4Gu-0002Kd-48 for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Jun 2022 10:11:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nx4Gs-0005im-Vv for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Jun 2022 10:11:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nx4Gs-0005id-MN for pgsql-hackers@lists.postgresql.org; Fri, 03 Jun 2022 10:11:10 +0000 Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nx4Gq-0001tm-76 for pgsql-hackers@lists.postgresql.org; Fri, 03 Jun 2022 10:11:10 +0000 Received: by mail-ot1-x336.google.com with SMTP id e11-20020a9d6e0b000000b0060afcbafa80so5203028otr.3 for ; Fri, 03 Jun 2022 03:11:08 -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=8xzcV3pIRzqjmOaQf3LxoJXS784uV4V87Uj3NIfDtBw=; b=WEqJn2Y4wyC0zij9D81HjFb1adRUbKmLBHzG9ZHS7dZphFdNYKQHbwFiykPNszj1AZ 9JvuK44MnfT8U/lMAT25Dg4/wZwHFM4EgVQSjMRCuhOCTxuFSGdcMH+HwOwLkFcNVoFe aJqhcFrbCVDUfrRxQqAre6lfyYuJoXKYLpqKRZJr/7b/5pC6RtukqjVEkp/MTKSvcpLv PyklXouUDXtONmOYJXSEmQJ++/u4Ap9bE8BjvrVwguJdGjCCWjDfIQWAYccF6q5p9e39 ojFIts3sdQF0TznyLeLcaA5GJtfmobLxRJ92YvyGW628oDfhMD81ZzWHboaZ5hxHNglc /kVA== 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=8xzcV3pIRzqjmOaQf3LxoJXS784uV4V87Uj3NIfDtBw=; b=0UKoViCSiroedjLANkBtKOAg6HVvs+/GJaMUvRolNPw6wdD7vDHjdRQEtxpaykFhKq f/ZzhMaPrmh43w6/j3tHzNQ2glzPkYR14cbJecDRe1a5J3Jzk3uk5eSP3+ThphvTBjeG Oj4GvVnT8FF0+PWPE8HdJko3Z7VSs12W4KVZwX2icQb7eKu8UkcZKRKmq9IvHsylsg9a Hadaw8DdZC14S0AZATRyhs6hIUQSW7SMP93HvLK9aZ433U/pbWTHR9FJipbqQYzjSQk/ WOm4N1U4CGey5rVg96ZHbYwJ4m0/VfcnPN8RqSA0crd4/D/SJXQj2ksyBQXzo/8MaGKK klYA== X-Gm-Message-State: AOAM533WF2ivhIEe9HnRc74hOV+ZrxZMZafVTv/wfWgSfo1seJWpsOof h8ycOUq7LzXDvBfx4rnHdiOtMPuUR+HZEGo21ck= X-Google-Smtp-Source: ABdhPJxpEMoBskliz7Z9/YbNq5G+TXnPPZ5eTvylQm5z4pJ/ZKpzGdHWlWW9iiwZ3Tjf/a7EXjPbaDc0+eezmww71cc= X-Received: by 2002:a05:6830:2b07:b0:60b:b38:fcc0 with SMTP id l7-20020a0568302b0700b0060b0b38fcc0mr3713507otv.353.1654251066551; Fri, 03 Jun 2022 03:11:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: vignesh C Date: Fri, 3 Jun 2022 15:40:55 +0530 Message-ID: Subject: Re: Skipping schema changes in publication To: Peter Smith Cc: "osumi.takamichi@fujitsu.com" , 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 'On Mon, May 30, 2022 at 1:51 PM Peter Smith wrote: > > Here are some minor review comments for v7-0001. > > ====== > > 1. General > > Probably the commit message and all the PG docs and code comments > should be changed to refer to "publication parameters" instead of > (currently) "publication options". This is because these things are > really called "publication_parameters" in the PG docs [1]. > > All the following review comments are just examples of this suggestion. Modified > ~~~ > > 2. Commit message > > "includes resetting the publication options," -> "includes resetting > the publication parameters," Modified > ~~~ > > 3. 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 flag to false and > + dropping all relations and schemas that are associated with the publication. > > > > "resetting the publication options," -> "resetting the publication parameters," Modified > ~~~ > > 4. src/backend/commands/publicationcmds.c > > @@ -53,6 +53,14 @@ > #include "utils/syscache.h" > #include "utils/varlena.h" > > +/* CREATE PUBLICATION default values for flags and options */ > +#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 > > "flags and options" -> "flags and publication parameters" Modified > ~~~ > > 5. src/backend/commands/publicationcmds.c > > +/* > + * Reset the publication. > + * > + * Reset the publication options, setting ALL TABLES flag to false and drop > + * all relations and schemas that are associated with the publication. > + */ > +static void > +AlterPublicationReset(ParseState *pstate, AlterPublicationStmt *stmt, > + Relation rel, HeapTuple tup) > > "Reset the publication options," -> "Reset the publication parameters," Modified > ~~~ > > 6. src/test/regress/sql/publication.sql > > +-- Verify that publish options and publish_via_partition_root option are reset > +\dRp+ testpub_reset > +ALTER PUBLICATION testpub_reset RESET; > +\dRp+ testpub_reset > > SUGGESTION > -- Verify that 'publish' and 'publish_via_partition_root' publication > parameters are reset Modified, I have split this into two tests as it will help the 0002 patch to add few tests with the existing steps for 'publish' and 'publish_via_partition_root' publication parameter. Thanks for the comments. the v8 patch attached at [1] has the fixes for the same. [1] - https://www.postgresql.org/message-id/CALDaNm0sAU4s1KTLOEWv%3DrYo5dQK6uFTJn_0FKj3XG1Nv4D-qw%40mail.gmail.com Regards, Vignesh