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.94.2) (envelope-from ) id 1u0ZGd-003WJU-Un for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Apr 2025 05:07:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u0ZGb-00DiAP-U5 for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Apr 2025 05:06:57 +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.94.2) (envelope-from ) id 1u0ZGb-00Di94-FI for pgsql-hackers@lists.postgresql.org; Fri, 04 Apr 2025 05:06:57 +0000 Received: from mail.postgrespro.ru ([93.174.132.70]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u0ZGY-002rMY-1Q for pgsql-hackers@lists.postgresql.org; Fri, 04 Apr 2025 05:06:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1743743211; bh=T4nsWcphPTMIpC4aBVIqwZ4Fd4gCg4Keh6akQLpasOs=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=BREyiXK9rrTUBtAcT65gWPp3PzfqVWtcOkJ2UGl2xwoSCd6vY7Ogco66mcl8zzl5K bFa0salv2q41jl7nxTm/QEcKK9AsFKwASRH5av1dV10qiNVJuh0b65uiyGjbslX6uP qCJrVGvwIMolEGuAXcS1BRAsrF6G3A12DCMC9Zj0+IpelPU2IcdCkj0RrlWDyZhGOs sk0VDlXw9aaWrwIncproKj5IgVsLX2UdahnErFaXZTAkDcNC0v/eF4zaAFwaIlcgkj yP1B93eSM7dPpy8ArCuhdSePe4xfaYOnjaNeiI4DrOu6JwpFRKtbGG7iDHhQ3lu5CL ciWQCoPrteHEA== Received: from [172.30.48.46] (unknown [93.174.131.138]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: s.tatarintsev@postgrespro.ru) by mail.postgrespro.ru (Postfix/465) with ESMTPSA id B7FCE608D3; Fri, 4 Apr 2025 08:06:50 +0300 (MSK) Message-ID: Date: Fri, 4 Apr 2025 12:06:49 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Restrict publishing of partitioned table with a foreign table as partition To: Shlok Kyal , =?UTF-8?Q?=C3=81lvaro_Herrera?= Cc: vignesh C , pgsql-hackers@lists.postgresql.org References: <202503281104.t47zhqlep54q@alvherre.pgsql> Content-Language: en-US From: Sergey Tatarintsev In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-KSMG-AntiPhishing: NotDetected X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.0.7854, bases: 2025/04/04 03:01:00 #27854343 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: not scanned, disabled by settings X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 01.04.2025 21:48, Shlok Kyal пишет: > On Fri, 28 Mar 2025 at 16:35, Álvaro Herrera wrote: >> On 2025-Mar-28, Shlok Kyal wrote: >> >>> On Mon, 24 Mar 2025 at 21:17, Álvaro Herrera wrote: >>>> Also, surely we should document this restriction in the SGML docs >>>> somewhere. >>> I have added comment in create_publication.sgml >> Hmm, okay, but "We cannot" is not the style used in the documentation. >> In addition, I think this mechanism should be mentioned in >> logical-replication.sgml; currently there's a note in the Restrictions >> section about foreign tables, which should be expanded to explain this. >> > I have modified the comment in create_publication.sgml and also added > comment in the restrictions section of logical-replication.sgml. > I have also added a more detailed explanation in comment of > 'check_foreign_tables' > > I have attached the updated v11 patch. > > > Thanks and Regards, > Shlok Kyal Hi! I looked at the latest version of the patch, and think that we should free puboids list here: diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 6a128f7bd4e..4254654cc24 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -20122,6 +20122,7 @@ ATExecAttachPartition(List **wqueue, Relation rel, PartitionCmd *cmd, relname)));                         }                 } +               list_free(puboids);         }         /* -- With best regards, Sergey Tatarintsev, PostgresPro