Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vLttl-00DqV0-2b for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Nov 2025 01:55:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vLttj-00GtXQ-1O for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Nov 2025 01:55:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vLttj-00GtXH-02 for pgsql-hackers@lists.postgresql.org; Thu, 20 Nov 2025 01:55:47 +0000 Received: from mail-il1-x130.google.com ([2607:f8b0:4864:20::130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vLttg-000RLy-28 for pgsql-hackers@lists.postgresql.org; Thu, 20 Nov 2025 01:55:46 +0000 Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-435a16798feso5457295ab.0 for ; Wed, 19 Nov 2025 17:55:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763603745; x=1764208545; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/HRdECgBVVlwvbboFl+9ahYz/HROjvcqOeLvmmYXRWc=; b=BGSlnwBRJjlcTInqvqpuC83hjGMdHye/JtwykQYIPihLPB/YjPby9DHn1RQbWfsLMW aB0phPKQwaKCvs+ZtN8Pj/P81DxmLybS5NaRHDU5hAjMBnFiyWA5ToVvTyIJ7cs9BogV EEn2w/iK1NKrvBZZiYGeo2bsHkH/aSmKHhDjeF4cDAYXrxCXM4WJHAz9sdoYcejHE4XL Ijx8L9h55PnCisS1ELxvl9hldOKtciIFZdB+xO4asSH183G7E/ldfQ8uU+WG22riww5O ReiScgtHVpk+t4CT70aIcBR2C9ffp78FExvXSLaE7OE+4it+iaDPzb4mB7r7hnzy1P+q 2aOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763603745; x=1764208545; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/HRdECgBVVlwvbboFl+9ahYz/HROjvcqOeLvmmYXRWc=; b=f9sE8AdOV20ZaKeRnjfg9PYPmSS0Wdt9KTEREOb8kZSu/2hpFqTTFC4bIWIQJvJedE bvwfs5CO5KXS8xmD1oxyOSx34GFbneHx7YxEpzn4KDweA0bj1FK5awOis+VgkBNYUtvP iexjH9tMAMl5IWF5Vp6IhH9lTRNgeS12mnJP+PmyEXKkCoryJuOy86N0Wmj0VVsBunGK h0ogduX2fy1UUj0jrN7fzFACa23YjHsy9IqefmVCm94uzaG+cTDjEubrwLQBDcYpZxq0 YQvJDmGmW6fyxmX0V7U0lMCgHE5Pcddp/zTuFsWzwotLvdveQxJTLfH+AJiHur+bHW9T TXYA== X-Forwarded-Encrypted: i=1; AJvYcCXMpOmeW/RqPFtty9e7yJEuE9r37CeT3V8/QcophrOujyU/HCWxGBAEvQURqM75pYi5YBF3sA3fcvXOdMky@lists.postgresql.org X-Gm-Message-State: AOJu0YwMKbiWDaA2y/Hei6B0VD8RQXkM4J94Y6prqd2ox4PdYfRjXy39 wfExntetMnnbeKIDXAFqeBRB4VPYT7i6bATeKrfvYHYBjWSgfws64o/Jyjq8XIHdpLulJ4I3S+1 WRvjD1SYW7rS14ReNdMOp3T1zkpCWbtQ= X-Gm-Gg: ASbGncugWlBiONw9hNWDL5/kOEslHs/UgjxQEErTbn6SDxgY2C9zy3RHvLb12Rx0Jkp FOg68zYldbn6xZe8TnYtPLTzjd7mPJDc1IfXbKwqGjcw+pAN7woDohFvns5NPRzxXYUNS+udFqa Yq5IZRXrg8q53wl5mjV5i0Z9tCvvcbNwbWZLBhH9wNGQEIsSmixcAfkaUxujnr3uLE/AgMlrA2b fg5QK0hTa1t/lupkvEm23AUR/YBHeaDfvM7ABNjRUB9H7l3EQLfc1Q75T9CXtca35vPLLjXcaGW v7td0SHMZSWIqu4GnugJ2ZlEEXtLOC37y6LBkqji X-Google-Smtp-Source: AGHT+IFlYZAiyZzfx+4N+I8xozSrFeTvJAasfgpqbeSZ43aCCni51Mk/O4QZ1NdFzULkenw2oIQ4GMpLKpMHsuM2/0Q= X-Received: by 2002:a05:6638:a40c:b0:575:f64a:dbbd with SMTP id 8926c6da1cb9f-5b95684f446mr699645173.6.1763603744623; Wed, 19 Nov 2025 17:55:44 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Peter Smith Date: Thu, 20 Nov 2025 12:55:16 +1100 X-Gm-Features: AWmQ_bn_H-rO5kQBMb-gkAX2Kvv0x9lhgJgQcJwIn78P86lpoj0Cbc8KTaU2Q98 Message-ID: Subject: Re: Skipping schema changes in publication To: Shlok Kyal Cc: vignesh C , Amit Kapila , "Zhijie Hou (Fujitsu)" , YeXiu <1518981153@qq.com>, Ian Lawrence Barwick , 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 Hi Shlok, Some review comments for patch v28-0001. ====== src/backend/commands/publicationcmds.c AlterPublicationReset: 1. + values[Anum_pg_publication_puballtables - 1] = BoolGetDatum(PUB_DEFAULT_ALL_TABLES); + replaces[Anum_pg_publication_puballtables - 1] = true; + + values[Anum_pg_publication_puballsequences - 1] = BoolGetDatum(PUB_DEFAULT_ALL_SEQUENCES); + replaces[Anum_pg_publication_puballsequences - 1] = true; The PUB_DEFAULT_xxx made sense for all the publication parameters, but these are just flags that say if the ALL TABLES or ALL SEQUENCES clauses are present in the command, so I'm not sure that "default" macros are appropriate here. e.g. it seems better to reset those using hardwired booleans: values[Anum_pg_publication_puballtables - 1] = BoolGetDatum(false); values[Anum_pg_publication_puballsequences - 1] = BoolGetDatum(false); (This would also be consistent with what the function comment is saying) ====== src/include/catalog/pg_publication.h 2. +/* default values for flags and publication parameters */ +#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 +#define PUB_DEFAULT_ALL_SEQUENCES false +#define PUB_DEFAULT_GENCOLS PUBLISH_GENCOLS_NONE As in the previous comment #1, I don't think we should define PUB_DEFAULT_ALL_TABLES and PUB_DEFAULT_ALL_SEQUENCES. Also, change the comment to remove the words "flags and". ====== src/test/regress/sql/publication.sql 3. I don't think the parameter names should be written in uppercase because that's not how they normally appear in the docs and examples. ~~~ 4. +-- Verify that 'ALL TABLES', 'ALL SEQUENCES' flag is reset typo: /flag is reset/flags are reset/ ~~~ 5. +-- Verify that associated tables, schemas and the publication parameters +-- 'PUBLISH', 'PUBLISH_VIA_PARTITION_ROOT', and 'PUBLISH_GENERATED_COLUMNS' +-- are removed from the publication after RESET The comment makes it sound like parameters are "removed". Maybe some rewording is needed. SUGGESTION Verify that a publication RESET removes the associated tables and schemas, and sets default values for publication parameters 'publish', 'publish_via_partition_root', and 'publish_generated_columns'. ====== Kind Regards, Peter Smith. Fujitsu Australia