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 1nmnom-0003bN-5H for pgsql-hackers@arkaria.postgresql.org; Fri, 06 May 2022 02:35:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nmnok-0000LY-1z for pgsql-hackers@arkaria.postgresql.org; Fri, 06 May 2022 02:35:42 +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 1nmnoj-0000LO-NZ for pgsql-hackers@lists.postgresql.org; Fri, 06 May 2022 02:35:41 +0000 Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nmnoc-0002e3-6R for pgsql-hackers@lists.postgresql.org; Fri, 06 May 2022 02:35:40 +0000 Received: by mail-qt1-x82c.google.com with SMTP id x9so5002440qts.6 for ; Thu, 05 May 2022 19:35:33 -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=pZap8gKdDAyCD7LKko3NJgewONKr8jPtXGxh5EqFSSA=; b=FaVgq+FPrcARcU/iaI8WrHqngbJv0uKS2c5LteVODN4JsBAaqVcQfEPKTYbmBZrglq RFQUsyrOzhESC39+4oYHIr5Uc1G14IVULJb93DLr4MODtfFlEVFkfI4RWfLzcBa7wWox 23qT5VEYV2v/sWVutzkMCwnGhnZJvBZhnONwbnudexKURP5KlF+HFvaGPCuYen6w4rBA FXRoG9vnAcByp1p5shhIHizWGB6HN8ytu1DDSXRuMjMWvmm/07U/6TX0f8MCIfvJuZfu 9TZsxqs1CrxE8RS6YqZUAcuwWM5mK7T1csB4XQvn8ejub7MV/GtXLbES7lZpArBv7mu6 DVmw== 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=pZap8gKdDAyCD7LKko3NJgewONKr8jPtXGxh5EqFSSA=; b=WPRbo83+qPc7Ai2fCUin1bZ5+STjC96uglNg9Cj1L1YQtDJeaMneAcdEe53ilvUlPy c1umeByG+brHQzsYWHbBcqI2k/RaRVfazEzmlLDe9KvMvXl4f1++fq06DzzyfeydPspx aqKSdGJ3bvuu33zmVgDCke6KexKZ4bsma2Y5R8Ie9Zlnjo31UUXlwKj2xPSpZJjNZJ4Z 52M0aEvJUCCrEnQp7I+fSk7et5dT30ZLE6e/OFOaq1W3oRI+A29fAvt986seaIzxws8p rf6Qv9H/OCIAmzMcZfDHeiidK6udaUPaq9rU2isB6oIa9cL6OevOui1Z/gXOolsza+Tn vVYQ== X-Gm-Message-State: AOAM531vJMsyI/c3w72eiPrPqZggUIPE3l8T17nPdeCHAe/RhWof3xFD VDIwJxjCjyhe4BlhAovyb4OJI2Cz0M831iD+HE4= X-Google-Smtp-Source: ABdhPJw3E/23PaMPcY9ivz3/FtnLMkwtHa8cmDEF3YCctuazvgtEAyaPEQoQljFOSX0MUfXVX533CNlsSCFgJDArjVE= X-Received: by 2002:ac8:1487:0:b0:2ef:ca47:89c1 with SMTP id l7-20020ac81487000000b002efca4789c1mr970400qtj.646.1651804532059; Thu, 05 May 2022 19:35:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Peter Smith Date: Fri, 6 May 2022 12:35:16 +1000 Message-ID: Subject: Re: Skipping schema changes in publication To: Amit Kapila Cc: Bharath Rupireddy , vignesh C , 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 Thu, Apr 28, 2022 at 9:32 PM Amit Kapila wrote: > ... > > Another idea that occurred to me today for tables this is as follows: > 1. Allow to mention except during create publication ... For All Tables. > CREATE PUBLICATION pub1 FOR ALL TABLES EXCEPT TABLE t1,t2; > 2. Allow to Reset it. This new syntax will reset all objects in the > publications. > Alter Publication ... RESET; > 3. Allow to add it to an existing publication > Alter Publication ... Add ALL TABLES [EXCEPT TABLE t1,t2]; > > I think it can be extended in a similar way for schema syntax as well. > If the proposed syntax ALTER PUBLICATION ... RESET will reset all the objects in the publication then there still seems simple way to remove only the EXCEPT list but leave everything else intact. IIUC to clear just the EXCEPT list would require a 2 step process - 1) ALTER ... RESET then 2) ALTER ... ADD ALL TABLES again. I was wondering if it might be useful to have a variation that *only* resets the EXCEPT list, but still leaves everything else as-is? So, instead of: ALTER PUBLICATION pubname RESET use a syntax something like: ALTER PUBLICATION pubname RESET {ALL | EXCEPT} or ALTER PUBLICATION pubname RESET [EXCEPT] ------ Kind Regards, Peter Smith. Fujitsu Australia