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 1nUXOX-0003ie-QS for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Mar 2022 17:25:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nUXOW-0006yK-IX for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Mar 2022 17:25:08 +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 1nUXOV-0006yB-US for pgsql-hackers@lists.postgresql.org; Wed, 16 Mar 2022 17:25:08 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nUXOQ-0003T2-Pw for pgsql-hackers@postgresql.org; Wed, 16 Mar 2022 17:25:07 +0000 Received: by mail-ed1-x535.google.com with SMTP id a17so2571353edm.9 for ; Wed, 16 Mar 2022 10:25:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=message-id:date:mime-version:user-agent:subject:content-language :from:to:cc:references:in-reply-to:content-transfer-encoding; bh=UWfmCW2sFQtomGphpxpJH6HYxTXpvCXu7V9HjGluO/Q=; b=ITZvooWjJq2WkdgpeV+fPQC2N9aNjGoQPDfQiKDJBhwqhczoHQARyngHWt7l4U5pFD z161Xdv1HGHcQetRaTpfV+C9p2ehHvLamH0SzrD+BR3x/wtwndhg2Q27RUwKQNI5mqlM HTm+A79CcpWJTGprUiMMyNcBXsq43/9BUJYp6faB+JdEyPjyKePTExfN/NyQXL71XhLx CyAPIcA5AdVk5lpNW6c/mlo3VCgKBmQlGR9hyffNnkILG39oZtEfgDtB47uNzt/SnM6e x/n0o7SSV4Llz9QtupFClnehQ36tePNr4wlKA48pAVwfobmbypQXMuOB4QdF694d1z80 0cqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:from:to:cc:references:in-reply-to :content-transfer-encoding; bh=UWfmCW2sFQtomGphpxpJH6HYxTXpvCXu7V9HjGluO/Q=; b=QBrmpcMKfmcRp14oq9w79GVNivk6dzwPyDGEZ5894L7Tf7ULHcvqJZybt3q8X5Qpco AepWasolMrcX2kqC/eyNffhh8uENPGnhT0HlKZOJRyo/S2n+0F5H+V9hEgsHaaY1l8sT 56fCoIhu5/fE2datJFfWs3+lzlFsG/DVJSkgjsxXCM2g9AJVgJYsOvz0Lqo7QDS43K+H vSXuqaZywkqryYA84fA5qEnFTyn8YGGPw3n5R38VXxc6AVVpJaZm1GRDLhiOAuFX39m0 oOqiQlq7TphpylWl6944SVVrB2A6kCpsWsjNTtnulIRKGecPAy4lH1shtwxKG0FEhyvk r8vw== X-Gm-Message-State: AOAM533mFGh7oM0b9EZVuP50tyBz25FkMJpZsUXBr/MtDXR8zsh9C5dm LIlhZhLPVauDssT5DU+UqUcmAyIE7EBu2mHGsThAV1oygnOBUB/w1GAa/+Uzytp9I/ZmsHnyOVZ N/S8hDqvUVIcimyTmYk2nzA2FOEh8kj+Zvf6ox9eqAAOyh2xymSO3IBeDmfrX31g37bST1pBaZg HIWbItsS2ptOTQZ+/rKLk4NVgtdEWDMZ6hRlYz X-Google-Smtp-Source: ABdhPJyuMJO2Hr1m+EH3ZaC5eyFPtUePbc1EaHHEFZr0xuXDWC9qd+2JyZa8n1hKH0uxGdFa9YwZMA== X-Received: by 2002:a05:6402:1d4e:b0:418:d622:986 with SMTP id dz14-20020a0564021d4e00b00418d6220986mr495689edb.325.1647451500201; Wed, 16 Mar 2022 10:25:00 -0700 (PDT) Received: from [10.137.0.17] (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id lb14-20020a170907784e00b006d5c0baa503sm1147821ejc.110.2022.03.16.10.24.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Mar 2022 10:24:59 -0700 (PDT) Message-ID: Date: Wed, 16 Mar 2022 18:24:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: Column Filtering in Logical Replication Content-Language: en-US From: Tomas Vondra To: Amit Kapila , "houzj.fnst@fujitsu.com" Cc: Peter Eisentraut , Alvaro Herrera , Justin Pryzby , Rahila Syed , Peter Smith , pgsql-hackers , "shiy.fnst@fujitsu.com" References: <202201120041.p24wvsfcsope@alvherre.pgsql> <78b8d385-57cb-9a3f-cfe5-9f300f15eced@enterprisedb.com> <822a8e40-287c-59ff-0ea9-35eb759f4fe6@enterprisedb.com> <2b8471f9-3849-c91f-ef82-9181d4bca0a7@enterprisedb.com> <16e83ce3-8415-b732-37b2-c3329a2c13a1@enterprisedb.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/15/22 09:30, Tomas Vondra wrote: > > > On 3/15/22 05:43, Amit Kapila wrote: >> On Mon, Mar 14, 2022 at 4:42 PM houzj.fnst@fujitsu.com >> wrote: >>> >>> On Monday, March 14, 2022 5:08 AM Tomas Vondra wrote: >>>> >>>> On 3/12/22 05:30, Amit Kapila wrote: >>>>>> ... >>>>> >>>>> Okay, please find attached. I have done basic testing of this, if we >>>>> agree with this approach then this will require some more testing. >>>>> >>>> >>>> Thanks, the proposed changes seem like a clear improvement, so I've >>>> added them, with some minor tweaks (mostly to comments). >>> >>> Hi, >>> >>> Thanks for updating the patches ! >>> And sorry for the row filter bug caused by my mistake. >>> >>> I looked at the two fixup patches. I am thinking would it be better if we >>> add one testcase for these two bugs? Maybe like the attachment. >>> >> >> Your tests look good to me. We might want to add some comments for >> each test but I guess that can be done before committing. Tomas, it >> seems you are planning to push these bug fixes, do let me know if you >> want me to take care of these while you focus on the main patch? I >> think the first patch needs to be backpatched till 13 and the second >> one is for just HEAD. >> > > Yeah, I plan to push the fixes later today. I'll polish them a bit > first, and merge the tests (shared by Hou zj) into the patches etc. > I've pushed (and backpatched to 13+) the fix for the publish_as_relid issue, including the test. I tweaked the test a bit, to check both orderings of the publication list. While doing that, I discovered yet ANOTHER bug in the publish_as_relid loop, affecting 12+13. There was a break once all actions were replicated, but skipping additional publications ignores the fact that the publications may replicate a different (higher-up) ancestor. I removed the break, if anyone thinks this optimization is worth it we could still do that once we replicate the top-most ancestor. I'll push the second fix soon. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company