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 1w2rNr-000fwD-0h for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Mar 2026 13:56:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2rNq-00BGFY-0W for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Mar 2026 13:56:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w2rNp-00BGFQ-2s for pgsql-hackers@lists.postgresql.org; Wed, 18 Mar 2026 13:56:25 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w2rNn-00000000wNu-2EVg for pgsql-hackers@lists.postgresql.org; Wed, 18 Mar 2026 13:56:25 +0000 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-38ad12fb595so8023621fa.0 for ; Wed, 18 Mar 2026 06:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773842182; cv=none; d=google.com; s=arc-20240605; b=lfMnvL/W1WlHYVVgZ3jh7sB4b6/uy958ad8a+OlExAsiTP2LFe36GWQq2UZwvXx0dd x67c42zAWqU40SnXDVyqBL9Yt+sWWK9tFf90UHk0ILDotHBsDTMQ62+L3xxq0cOyJ3YM rwINal6NgvJJvcz/uS6EbjL9eDxSvC9EgG2+G8ZaPEYoGVOzGjGT3Z7yqzFa9VBboX+t InAEO8mn1sjtGo20hxkeNSb9jbUPi32GyUQ89yPXH1Zn4PyzcAqef1KD8EUVKFwyf6Wg JAZbvQ1wHdTK4HBbqhlRkCNItJoP/w65kCG/UL47IHWILarAQEcaxVn3yQjr4/pmzXe8 LroQ== 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=8Lg0H+aD201eihAN+VAvmnqoxZidP3Ni4q0Ctxf9hFQ=; fh=p1sYPDvdTWDGr06MEQ5j1BZu63g+F5LigLHV51Yi2sE=; b=OfOazNoEZSNSD/7deeTfJgVVQfPTV6HDvZfHHZGOWX8S63Mati1IpNuRSAar6c90ZT r0CjK6Y8C92car02Lqj0LWzDicUqlbA7K6oXIejZtXtgsKX0C/Z5Av62nRAj5a3X3Chy mucY8+IFIauFgTk5+wlk/GJvM1eNqpI4XjLeP/LguxjZOuEWnTPDHO4MdhiIVu0V30V8 /2oa4WBz755C1YwJ/XAEozHhNN1K5F0He7PAmu3tzTdyJaeghg3y3OWp6QtD4lwQRIJd Porf2HpWwUmktyAiAK7lU7fM2qX0JSqg6lJ0IPTRp6zWoFCHV9zy1xVLBZ5tpYRdPdyH v/AA==; 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=1773842182; x=1774446982; 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=8Lg0H+aD201eihAN+VAvmnqoxZidP3Ni4q0Ctxf9hFQ=; b=Jq3f3Kg4jd6xzRNl8MXnEiwdyItJtEfYprVTByHnGycBsF/nUj0nI8qUXM0OVH511V G3QbaUOVvIeME4mV5zcJCOKlxkfq0LDcVbAVsmGBBYQuGZ0XWCu15wvvz3QpnKfcnqGK GeOVXPSF323t3/HQ3+49vSfbaQgsZ3kNsL51Tql0L4bINcZO2oxr3YxzljnJsZTVWNCf KZMRzB8Jvl4cG3sJ9bsTLuVxcqBYVWvf7CFPe6p1Wy05uIDjjXADjTGSC7VTY4NGKm9o 7KTwCNRQwiC4bQV4WjJdsjlxcn5eqOt4IQjVJJtEGfybvIppM15Yb12xN4bsrlEDtp/a LDhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773842182; x=1774446982; 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=8Lg0H+aD201eihAN+VAvmnqoxZidP3Ni4q0Ctxf9hFQ=; b=Q3KTuGK2dyG4/Wx8l5wa/KjctO0SwGpd0ZNzJ++Bl7I9sm1Vw4NVscgnYMnIJ5AXDv ARMjJjGEo9S4000BG1swmEit9wObXEINp+STz5oiV5hWMA1vJcVcYNK8cCIkWsWRokWl FQdi4ptaxH5UuukV1n4qG7U39ToYj3vbEW1TCQQBffolDkIkPVAG5uAXJP/vj41tkpUN YLMFm8byIcnIOKIVjmWlzrPc4KcLLGtlC6EJ6QFTFwJw6Ykh87p8jmI+ewtURw2EcX26 JjzXu0jOQFpQ7ELY3Q871Q21e9d9qxj3W+rg5ygr5wxWNUoWoBa2N3ShMysuT9WF6mTs Zkrw== X-Forwarded-Encrypted: i=1; AJvYcCV9o42IZ0IOFaI0vYSf5vtw5N29hP9Gc2ZMdzEZy73+10NNY4AfogDFBBU4HUYYRFtRMP67sSmvq0Ea2hNj@lists.postgresql.org X-Gm-Message-State: AOJu0YxzXWCHESKn2FnAOsuy4HrguGK9OVOtXpg8BRadUPkTuqrmu8C/ k5odfnSWixgnJyaM4uIQ8fwRxqqLMBoR7L1uqICyEWJx+yvq432emHz22liqQes229IJ2meBZqZ 2LhJ8sGVyzV1YfrgTSwwlUqZTXAY9h4M= X-Gm-Gg: ATEYQzyA9fPzucPJuBygUMM35Rwxbq9d5h62rvKDzAOThGBr146uXJrOzkG4sUuM4Ps Hubx9Bwq5LEwnUG9JibQZUT6d8+C97tx2SABTLWrxq1OHqC98YxgsqD1lf7RqGeB+05c/6LQlbI lJT+A8DgOOqeBzjpO8mWMw+iAhQX64M1QpY3lx7mz1LUVrJp0W7fh33cg7gOwXjCmwgRUcdgTfL 6QN+h2kcl6JvlZcZF5P8tInalzbNuqfhgF4VC3/xZ+WociSylOxzKPO8inw0JvvdwPCeG1OH26P WpTNbDZjPynpzWBN46R6nIjd2TbVYrknk0ArTYrZ/mmZTM9bOHuBkQoXAHJ0qXeUrdWQWoEfGg= = X-Received: by 2002:a2e:8396:0:b0:38b:d06f:1808 with SMTP id 38308e7fff4ca-38bd57af7f1mr9346641fa.6.1773842181436; Wed, 18 Mar 2026 06:56:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Wed, 18 Mar 2026 19:26:10 +0530 X-Gm-Features: AaiRm532nfq8y-nIaKdNtTsD6OvDrmEnGmk9CeTKkWHM8AqlDup80706NlID8aU Message-ID: Subject: Re: Initial COPY of Logical Replication is too slow To: Masahiko Sawada Cc: "Zhijie Hou (Fujitsu)" , Marcos Pegoraro , 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 Tue, Mar 10, 2026 at 3:40=E2=80=AFAM Masahiko Sawada wrote: > > On Tue, Mar 3, 2026 at 2:22=E2=80=AFAM Zhijie Hou (Fujitsu) > wrote: > > > > On Saturday, February 28, 2026 7:48 AM Masahiko Sawada wrote: > > > To: Marcos Pegoraro > > > Cc: PostgreSQL Hackers > > > Subject: Re: Initial COPY of Logical Replication is too slow > > > > > > Another variant of this approach is to extend > > > pg_get_publication_table() so that it can accept a relid to get the p= ublication > > > information of the specific table. I've attached the patch for this i= dea. I'm > > > going to add regression test cases. > > > > > > pg_get_publication_table() is a VARIACID array function so the patch = changes > > > its signature to {text[] [, oid]}, breaking the tool compatibility. G= iven this > > > function is mostly an internal-use function (we don't have the docume= ntation > > > for it), it would probably be okay with it. I find it's clearer than = the other > > > approach of introducing pg_get_publication_table_info(). Feedback is = very > > > welcome. > > > > Thanks for updating the patch. > > > > I have few comments for the function change: > > > > 1. > > > > If we change the function signature, will it affect use cases where the > > publisher version is newer and the subscriber version is older ? E.g., = when > > publisher is passing text style publication name to pg_get_publication_= tables(). > > Good point. > > I noticed that changing the function signature of > pg_get_publication_tables() breaks logical replication setups where > the subscriber is 18 or older. > Why adding a new function with additional parameters (Oid relid) couldn't help with such a case? I am asking because your previous version code looks simpler as compared to the new patch version. --=20 With Regards, Amit Kapila.