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 1nrewI-0001RG-0z for pgsql-hackers@arkaria.postgresql.org; Thu, 19 May 2022 12:07:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nrewG-0005Ve-SI for pgsql-hackers@arkaria.postgresql.org; Thu, 19 May 2022 12:07:32 +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 1nrewG-0005VS-FI for pgsql-hackers@lists.postgresql.org; Thu, 19 May 2022 12:07:32 +0000 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nrewC-00011w-EC for pgsql-hackers@lists.postgresql.org; Thu, 19 May 2022 12:07:31 +0000 Received: by mail-io1-xd2d.google.com with SMTP id e194so5485405iof.11 for ; Thu, 19 May 2022 05:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Mz85CywOWP0BZubaVh9RTh7O0RHV6y/aZYeQoATL/z8=; b=QtRI25yH8ctOucym2yCY+94mG8yFKUhpBEi0191zKbEdCdpyAwi5oijXdolw4ttK/7 NViBd9/DJWs8HiG+niKjXNTo6AjBSHQxr31Rt6iTkLguRxzWskatU84l0nbH5Yq5Z99P RZsQ215nYgNcis5s0WdNAoBH+xZjhuTXxS1YO+lo6OqRaSvILsoQyLp2rehHC4eT7nCs wepwZbvsVvYoYcYvfsVeGCrxweEPGsXj2Of3URqF/Aonpfbd7kWzKAtyQ1yHjFckhwKm 2xX24pA+hOGsTNWEZi2nrGXkmyatqonD7w7ffQiC9XVpp2XTPBTfrWXPGCy61MHbFqr/ iWxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Mz85CywOWP0BZubaVh9RTh7O0RHV6y/aZYeQoATL/z8=; b=mfdzyEwQOOQ924OAWxH4gFViEe+QngOofglKP8I/grNTUbE9yF9yHKDRhriyt5r2wa 2eK9s+UQuY/zLuIr5ShkZXmeexeBNUNH4gJ1BHrsaef6QDVJ0fke4NUp93XrSHJg1RXx s2g8O5v6LNc9TEDqQaSlGjw5lmccCJI8r5fGEb3Ntjy2KBg2ZADNBGr6kbpLjZc3qjfF 4u1c9ysJ+C/qQV2QNTvQCJOjnjZ0WfoCaudK4YJg74scTOAucC0y/lIp2mpiwWo5hg54 5dQH563UIpSFXHdglwqoQij8D+C5Q9VBTDOk/nNH6fsTetXp0yHbuWkz0heeqSNdWq7S t3GA== X-Gm-Message-State: AOAM530bdtSsWROGS0pv6EqJNNcNcmge1yOSvAKZ/SkkXnB5BCKILLZK WrOdwH9XGD0r6PbRXb1pTYk7xg== X-Google-Smtp-Source: ABdhPJwqHizRRGmlbyTjmUhh+qySJjU6Jz53Bmr5teVd7Rhl6BVmKCjX2G8+/jmEetCSi3hUoSTB0Q== X-Received: by 2002:a05:6638:12c2:b0:32e:8459:3ed5 with SMTP id v2-20020a05663812c200b0032e84593ed5mr2095477jas.163.1652962046090; Thu, 19 May 2022 05:07:26 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id cl9-20020a0566383d0900b0032b3a78177csm577441jab.64.2022.05.19.05.07.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 May 2022 05:07:25 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id C00EC800910; Thu, 19 May 2022 07:07:24 -0500 (CDT) Date: Thu, 19 May 2022 07:07:24 -0500 From: Justin Pryzby To: Amit Kapila Cc: Alvaro Herrera , houzj.fnst@fujitsu.com, Tomas Vondra , Peter Eisentraut , pgsql-hackers@lists.postgresql.org Subject: Re: bogus: logical replication rows/cols combinations Message-ID: <20220519120724.GO19626@telsasoft.com> References: <202205161320.butjtubabvgj@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, May 19, 2022 at 10:33:13AM +0530, Amit Kapila wrote: > I have committed the first patch after fixing this part. It seems Tom > is not very happy doing this after beta-1 [1]. The reason we get this > information via this view (and underlying function) is that it > simplifies the queries on the subscriber-side as you can see in the > second patch. The query change is as below: > [1] - https://www.postgresql.org/message-id/91075.1652929852%40sss.pgh.pa.us I think Tom's concern is that adding information to a view seems like adding a feature that hadn't previously been contemplated. (Catalog changes themselves are not prohibited during the beta period). > a. Revert the change in view (and underlying function) as done in > commit 0ff20288e1 and consider the alternate way (using a slightly > complex query) to fix. Then maybe for PG-16, we can simplify it by > changing the underlying function and view. But, ISTM that it makes no sense to do it differently for v15 just to avoid the appearance of adding a new feature, only to re-do it in 2 weeks for v16... So (from a passive observer) +0.1 to keep the current patch. I have some minor language fixes to that patch. diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index d96c72e5310..82aa84e96e1 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -9691,7 +9691,7 @@ SCRAM-SHA-256$<iteration count>:&l pg_publication_tables - publications and information of their associated tables + publications and information about their associated tables @@ -11635,7 +11635,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx The view pg_publication_tables provides - information about the mapping between publications and information of + information about the mapping between publications and information about tables they contain. Unlike the underlying catalog pg_publication_rel, this view expands publications defined as FOR ALL TABLES @@ -11695,7 +11695,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx Names of table columns included in the publication. This contains all - the columns of the table when the user didn't specify the column list + the columns of the table when the user didn't specify a column list for the table. diff --git a/src/backend/catalog/pg_publication.c b/src/backend/catalog/pg_publication.c index 8c7fca62de3..2f706f638ce 100644 --- a/src/backend/catalog/pg_publication.c +++ b/src/backend/catalog/pg_publication.c @@ -1077,7 +1077,7 @@ get_publication_name(Oid pubid, bool missing_ok) } /* - * Returns information of tables in a publication. + * Returns information about tables in a publication. */ Datum pg_get_publication_tables(PG_FUNCTION_ARGS) diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index 87aa571a331..86f13293090 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -11673,7 +11673,7 @@ prosrc => 'pg_show_replication_origin_status' }, # publications -{ oid => '6119', descr => 'get information of tables in a publication', +{ oid => '6119', descr => 'get information about tables in a publication', proname => 'pg_get_publication_tables', prorows => '1000', proretset => 't', provolatile => 's', prorettype => 'record', proargtypes => 'text', proallargtypes => '{text,oid,int2vector,pg_node_tree}', proargmodes => '{i,o,o,o}',