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 1vKsTx-00BtVp-0v for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Nov 2025 06:12:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vKsTu-00CIEG-1m for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Nov 2025 06:12:54 +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 1vKsTu-00CIE6-0O for pgsql-hackers@lists.postgresql.org; Mon, 17 Nov 2025 06:12:54 +0000 Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vKsTs-007W4f-0y for pgsql-hackers@lists.postgresql.org; Mon, 17 Nov 2025 06:12:52 +0000 Received: by mail-qt1-x82c.google.com with SMTP id d75a77b69052e-4ed7a7ddc27so37584041cf.2 for ; Sun, 16 Nov 2025 22:12:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763359971; x=1763964771; 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=EBz4E33SobnKTbYZsl0d7YbZzNnUnJmzlySduIO9Wj0=; b=e7hadqo4N/rowrtBG8F/ECmND4wtH4ocWczR7j51G6rg4NywyW7RKfWAskgWa3p5Hy fRfA9+JXYqEhcEWdAktg7p7Suptvsi/Xl0eRi81wCo6JI3ft0fksGvBMgXCqmiuaCgdC NBl0vTIgmdbazdeMWCiMAdhgwYWvY3ERy4tV19FWqz4chDLCpjO0Sypeb85gzHpojRGj tKg6sG+WAQQ7cmDQFYpWKgXKhnYH2xqXIBoG7AiVhOqcG9pAD0qYg+UKDCHoy7Dk4rLr r0MU5Sxr0yEiTfr7YkHh3NS7v6zYUTGj3ctgbwQ7xQRFOUG0DaGAbd8usyI/XElxMLp9 yyJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763359971; x=1763964771; 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=EBz4E33SobnKTbYZsl0d7YbZzNnUnJmzlySduIO9Wj0=; b=An1Pbnc0wnj91dpE4G04AwtU8oLxQYHHxyUeoGV8mXyp0I/6rjbL3bDQf+wrsD1MMn CVFxbnOITq/+TFUdPO8Ze8T41Lm1qLSVJ1V4eJEComb6KdZIQV7uPBHkHGBWPN0huJbw odZZiKD0WQt6hHcSAoNGaTdStEft1FCIiVkTCmCNjCtvvg9MPk1ut3eGMQFJT9kBh7/c bSZ41CIOMZqy7AHs7UYWvvMiCAxDX/w0pytGbAEqaBZ0eYMA+ORX8D4XmYMqvLbZf4Nj YnaHptUF+d1sWozIjSvUMln+adO/gVEwdTx5B5++HjEZcBaiyuTEmJKktAC52sA8/Wkc eEfQ== X-Forwarded-Encrypted: i=1; AJvYcCUwvikTM3Cip2NeRnhGH+H381V80TysD4jf/53ZDNVaIDg61jIDtD6/pFuRrZXjY0JIYP3T2ixYr79vShGm@lists.postgresql.org X-Gm-Message-State: AOJu0Yxz8v8NrZqfL80AaKjP60kIjQVBfzX0ubYjGmRCuYLTsbaFtLbH HuLY6Lv1kyFoOONpDGNchlzQynzfwayWyWaqiOvoYJmreF76Jm+Ygjd10vx/MKx6uumCaNSsiFn rOfXv1fX/HVZUXJzzJJ2ur11nin0hvcs= X-Gm-Gg: ASbGncvwVe4Klw0rhxdsUWKS6mm+Mb+D+rYP6e9XLmShtfsVI+SyEzyKZ1D995Jfr8F WEC/pRIH6vB8GQMSmOt8KMfCIShrgf+mdHbmBMttt5liT+OJdUtWOwB906t/Q51PZIahN17/72E Xr18rum0nt+q6J+OPHRxexXHGc39ZVKKToMTzmAcDUenJZv0RC3jHIc86Z1zjSKZxr6nhoctYDE rJk0XGqSk/b4dejuk2ucBC8X4NGPAq94/DXOwEKZHBrkuknQmA09zX+AnYI/MNpqk3mTXHBgS52 8I0jnYlSqyFfglyEiY2CCCF7UpOGEJn3qf+D9tWM X-Google-Smtp-Source: AGHT+IFt4GE7O98k7ksajYoK03ajzP78hgWhtWD7aWjVTdgnkju94wKzvr26fEggZ899U9VNn6rzqD70zIybiET9n2U= X-Received: by 2002:a05:622a:11d3:b0:4ee:1bc7:9d8d with SMTP id d75a77b69052e-4ee1bc7a2f8mr39741241cf.17.1763359970763; Sun, 16 Nov 2025 22:12:50 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Peter Smith Date: Mon, 17 Nov 2025 17:12:24 +1100 X-Gm-Features: AWmQ_bklXDxm0Q8xhj4rj1BFemkgsZe1dHt02CASWqRWaABRwkqsFwVPevTE_ew 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, Here are a few ad-hoc comments for patch v27-0002. ====== doc/src/sgml/logical-replication.sgml 1. - To add tables to a publication, the user must have ownership rights on the - table. To add all tables in schema to a publication, the user must be a - superuser. To create a publication that publishes all tables, all tables in - schema, or all sequences automatically, the user must be a superuser. + To create a publication using FOR ALL TABLES, + FOR ALL SEQUENCES or FOR TABLES IN SCHEMA, the + user must be a superuser. To add ALL TABLES or + TABLES IN SCHEMA to a publication, the user must be a + superuser. To add tables to a publication, the user must have ownership + rights on the table. Typo: Mismatched tags. "FOR ALL SEQUENCES or FOR TABLES IN SCHEMA" (The docs in v27-0002 cannot build because of this error) ====== src/backend/commands/publicationcmds.c CheckPublicationDefValues: 2. +/* + * Check if the publication has default values. + * + * Returns true if the publication satisfies all the following conditions: + * a) Publication is not set with "FOR ALL TABLES" + * b) Publication is having default publication parameter values + * c) Publication is not associated with schemas + * d) Publication is not associated with relations + */ +static bool +CheckPublicationDefValues(HeapTuple tup) Should a) also say "FOR ALL SEQUENCES"? ~~~ 3. What about checking defaults of other publication parameters, e.g. publish_via_parttion_root and publish_generated_columns? ====== src/backend/parser/gram.y 4. * TABLE table_name [, ...] * TABLES IN SCHEMA schema_name [, ...] * + * ALTER PUBLICATION name ADD ALL TABLES EXCEPT [TABLE] (table_name [, ...]) + * * ALTER PUBLICATION name RESET The EXCEPT clause part should be optional. ====== src/bin/pg_dump/t/002_pg_dump.pl 5. # # Either "all_runs" should be set or there should be a "like" list, # even if it is empty. (This makes the test more self-documenting.) - if (!defined($tests{$test}->{all_runs}) + if ( !defined($tests{$test}->{all_runs}) Is this just an accidental whitespace change? ====== Kind Regards, Peter Smith. Fujitsu Australia