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 1vx0qD-00AAVz-32 for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Mar 2026 10:49:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vx0pD-0008AJ-04 for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Mar 2026 10:48:31 +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 1vx0pC-0008AA-1S for pgsql-hackers@lists.postgresql.org; Mon, 02 Mar 2026 10:48:31 +0000 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vx0pA-000000000Ln-2lGF for pgsql-hackers@lists.postgresql.org; Mon, 02 Mar 2026 10:48:29 +0000 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-3878de20527so62976131fa.3 for ; Mon, 02 Mar 2026 02:48:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772448507; cv=none; d=google.com; s=arc-20240605; b=QEdbm5BjdnrSH6CdXnWI1CQEgpLW2ENFlPm8aMkFwAcjyZEGAoxwJnsQitr/1N4Gil kgfg8zPGfLLiRcD4B7aihm/8RVaaxdmO0M2zbP26Yku4kIsZ0DnAZpAbKLXiJL2ugPPD StmnnJP4Ig6DNgwWj1tNPKKnm/CQFSEGLddGVFehuUGrU9NHGUcHzZ353xwCCNSB1L68 hpzbZ42bUIVGGe+vBQeb9nivFQcj0aHdy5viTEN97mPZORZQdmXCFjEGsB7KX3b1m/1h Ch1KaUPrWdLGPy9xs1UPsti40yuzey0/StBcufd7pqUXhSzckBPVFUZRA7MlHqSufXyT E33Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=RXuEphM5jqTLX3jkTnnQBlJsB01ITrsVthkaogJdbYE=; fh=N/QBMQ/ZPssCWX1rcnZeG+R4GtiOnBLNUNQ14XCDUgs=; b=U0q/5bdTwlQw3q/GU2R3nypzJ1slLQv3RRe/+JEJXu7PpwvAdGO/jGdBPlc9xMJwOZ jBDH39aliKKrEBiR01DyFhcg8kT1iKq/5jAaea01HT0hU7qcx+8bTG9j5QqNFs0VVvFX ohv6CJdHnCCqoNPOTwsTZ+J/SvEeX21XGpnZ+sxbikJwTSJrUatlS83dTsZrejmHk33U Nul1ctmSylb/hEWtBqNkvJnAgI++BPQwkO7rpZmqZ8FQQhun3vnkhWRQsllTSYhPb7LM 9YATmPla9fJmSFpd7luG1uc9VkUW06hzM9SknoghJT7jjpEIUaOd9026jubecnDqtKLI z5Ng==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772448507; x=1773053307; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=RXuEphM5jqTLX3jkTnnQBlJsB01ITrsVthkaogJdbYE=; b=LcRfqk7gUeu0esU+jj2JI3mNfvRCatuWl+txgnDAb2O1Gpp1skIdCqkIT16Q0P3QPN 9ye2IJ21TkZcoSI19GyFnByqbwwXA4C9w8cDlPtLVGU52QeC0+DU+nWwacPvvSkg/meZ 0XnsooKo/J3M0d52JKwyWUr/TApwQ1Wzz0yo+gDcbA6t7zX/LiEFP78Z/AQoV4NbEjpr eSWtbDKwev01FN1OuM0mH684X6AtYu9D/9GR5/WpYJFhJkhf5v7vTuM4kUIo7CtVHu1H C2Y9mr2lH63AQF7deYC3iBdUlQNHPjQWWZIiQm8CxDD98hzBWzEErVSVK6/WMDOEXqOf tKTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772448507; x=1773053307; h=content-transfer-encoding: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=RXuEphM5jqTLX3jkTnnQBlJsB01ITrsVthkaogJdbYE=; b=BM+VMZdXp4FsT+L8JgKRn4iTY/HgGaR4dYEtFL/Xj9v1ZwsHdMoUqLnrSB5voJzDso Ht6b9qEuf/hGSgV6rAOrE+wYsK62VbPqgzwFY0UhP2g3ncP5MM4KT1WrblYob0kBenyE smDI6DxWdfMttWRnHrKiQCUWhi+meyLtUI47eabbvLKynDG+Q5lcttpHU1v90iPzIJVg YwOBykOAFoyRk/k9RB0ATOvun5khWMUlvuQQjYLAFBffxlT5CJjFJ6YCRXpVTn9m9Iux cyGzDjZQK6gwJoj2Sqy91M8iXyAIDnNkWh5ATmb62aVH9mVhyv2UwL8aAC26+rc9dv6X RRfQ== X-Forwarded-Encrypted: i=1; AJvYcCUbb8owJ7NN8I8b32dKEpPpb5QKR/rGvZqo+e8Zj0HlSVcR3L5VkmIIfwbk62h1nIo9Ras63JiMcvBI5O0k@lists.postgresql.org X-Gm-Message-State: AOJu0YyjhaS8M5agizDf6xVp7s8WxKfT4U15kcvInv15ctoCD2QRpI5I /rV9BZ4XfMX+3QspihKekcqdcGm8ZQINwkvCJf2WFZg03TyNizHmVREmKl7EqfYmNbRVzUHMVSX 5z8fkscGCTun4CAgtr07E2DJBkLLpX10= X-Gm-Gg: ATEYQzx+VgNZmMQo4t64KXbZJufLjWuxjZdgTbQ6h0F8UvVwxstSoni1tbwPQmOWDL8 JMFovQOQpoTVXyTaqSWFmlU+ZFXuIiIZqKSlcNCZEeYiDb53iJVavI57e/U6qLPOMRp10UKWwYa sYkNpCq5N3meg2z3G4+7fFDrJM28sK22wG9XEWw2R0svDqj6mPk1By3f020mjc23YKri+Q9p2z8 VWuc0XGEBu3BaNQxHuHufZ1JGy2Ci3msBL7xWJXeUR05eAg8gcyhUbpUjHKg7fWQ1fE3BqsKU1m YOgO1wh0uBG5qocRdEhnwyzQyfnUeOJslIpMJcj+EudKCiFCfzU= X-Received: by 2002:a2e:a884:0:b0:385:fbff:ab39 with SMTP id 38308e7fff4ca-389ff3504a0mr83804621fa.21.1772448506473; Mon, 02 Mar 2026 02:48:26 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Mon, 2 Mar 2026 16:18:13 +0530 X-Gm-Features: AaiRm51dW-46_zuevdjWVd9WXxlNegdrP7e8DW4ImOZVn-XrsQ17NHVSbquMWTU Message-ID: Subject: Re: Skipping schema changes in publication To: vignesh C Cc: Nisha Moond , shveta malik , Shlok Kyal , Ashutosh Sharma , "David G. Johnston" , Dilip Kumar , Peter Smith , "Zhijie Hou (Fujitsu)" , YeXiu <1518981153@qq.com>, Ian Lawrence Barwick , Bharath Rupireddy , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Mar 1, 2026 at 8:41=E2=80=AFAM vignesh C wrot= e: > > The attached v53 version patch has the changes for the same. > Few comments on 0001: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1. + appendStringInfoString(&pubnames, quote_literal_cstr(pubname)); + } + + ereport(ERROR, + errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg_plural("cannot attach table \"%s\" as partition because it is referenced in publication \"%s\" EXCEPT clause", + "cannot attach table \"%s\" as partition because it is referenced in publications \"%s\" EXCEPT clause", Because of the quoting before the error message, the publication names in the error message will be displayed in single quotes which are inside double quotes. See below examples: ERROR: cannot attach table "testpub_root" as partition because it is referenced in publication "'testpub8'" EXCEPT clause ERROR: cannot attach table "testpub_root" as partition because it is referenced in publications "'testpub8', 'testpub10'" EXCEPT clause Do you this type of quoting single/multiple object names in error messages at other places? What is the rationale behind this? The other place where I see such names is following but it also doesn't use the pattern followed above: A. postgres=3D# create subscription sub1 connection 'dbname=3Dpostgres' publication pub9, pub10, pub11; WARNING: publications "pub9", "pub10", "pub11" do not exist on the publish= er postgres=3D# create subscription sub2 connection 'dbname=3Dpostgres' publication pub12; WARNING: publication "pub12" does not exist on the publisher B. logical replication target relation "public.t10" is missing replicated columns: "c2", "c3". For this See logicalrep_get_attrs_str and following error_message ereport(ERROR, errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg_plural("logical replication target relation \"%s.%s\" is missing replicated column: %s", "logical replication target relation \"%s.%s\" is missing replicated columns: %s", I think we should follow what is done in logicalrep_get_attrs_str for message construction and translation. 2. * pub_all_obj_type is one of: * - * TABLES + * TABLES [EXCEPT [TABLE] ( table [, ...] )] Though the table is no longer optional, the above syntax reference still shows it as optional. 3. + List *ancestor_exceptpuboids =3D GetRelationExcludedPublications(ances= tor);; One spurious semicolon at the end of above statement 4. @@ -5838,16 +5841,22 @@ RelationBuildPublicationDesc(Relation relation, PublicationDesc *pubdesc) foreach(lc, ancestors) { Oid ancestor =3D lfirst_oid(lc); + List *ancestor_puboids =3D GetRelationIncludedPublications(ancestor); + List *ancestor_exceptpuboids =3D GetRelationExcludedPublications(ances= tor);; - puboids =3D list_concat_unique_oid(puboids, - GetRelationPublications(ancestor)); + puboids =3D list_concat_unique_oid(puboids, ancestor_puboids); schemaid =3D get_rel_namespace(ancestor); puboids =3D list_concat_unique_oid(puboids, GetSchemaPublications(schemaid)); + exceptpuboids =3D list_concat_unique_oid(exceptpuboids, + ancestor_exceptpuboids); } Why do we need to get the exceptpuboids for all ancestors instead of just the top-one as we are doing in get_rel_sync_entry()? --=20 With Regards, Amit Kapila.