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 1nTjYY-0003Uz-UR for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Mar 2022 12:12:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nTjYX-00041g-PU for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Mar 2022 12:12:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nTjYX-0003sc-55 for pgsql-hackers@lists.postgresql.org; Mon, 14 Mar 2022 12:12:09 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nTjYQ-0000i7-LV for pgsql-hackers@postgresql.org; Mon, 14 Mar 2022 12:12:07 +0000 Received: by mail-ed1-x535.google.com with SMTP id t1so19330522edc.3 for ; Mon, 14 Mar 2022 05:12: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:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=ch0pbSDjbGTjY3P1eT4tH/ahUVL6hLXK8WQb0K6uZjA=; b=AKR03vZCoriIBUBuZt9yagyrnMXgwapOnIlL+TKIjLyjVUnPJhtBFh3/6bW9HjNv5p J4l/jGn/jsu2x2DRU7Uff7eEgTWXDxUfKsnXxiSOPEx+Ud/ZBY1qtADF4adAMwxdkfZa LqXozc4qwBzih6Y3DESS9cW7rozuQUTyB07HSZBoXBsQq4cVmPSSC7fh5dz3xN1hbffZ wyFsriCfIqyJOL9yzW2BxA99nEkGvyfgX5WBq3s94ov7ORozYhyrLZF08nnR+Bfpm7oJ XGoPLcXFRuSiTAksYidtiHYM9AB3jS6euGn8IJF6SqF9grv38ezLHieUn8EusTQMtfub OVsg== 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:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=ch0pbSDjbGTjY3P1eT4tH/ahUVL6hLXK8WQb0K6uZjA=; b=kWuwHTtLp4javr+YQiTHuYu/gxa+ivLFuFLIf4rOxt5N2k+NaTbi5tt/4R0+6ssGxv p+lr+OJqKDjBwrLx17N3qmRuQrJp4ETyxBvADYQU65k24MwcHP8Fb0UrS5tp9kh9INMx nsviE7fHNIGPcP5p7XXYfFToZVguQ77hcHoR5qavhVLtuxhahcumN3zplDgOhIOnyNQ0 MZz9ssCw+VsWJCccmEMHcW8Li4VUkANfLPZ6cfbxdN2RkI06XoLVmUoe96LTsM+myozV UHJDikkZwNlhXsqRSwKTbTZ6VEStknRPEdmnis31OOwYWyPGpBdm6zn0fvcb/8cV9Wnp gD4Q== X-Gm-Message-State: AOAM5338lD5hxTu5+fxJb6qg/gmRc19cC/GbVa0MpJNQI9EFiyJffMXT 2TjKQwnMsGB0Mexmy+t+rcnu4ZfXQlyedMWx+L/yCFmcKMPB6S6o55qBDDIPpFe4TgqvuKonKTN PaTQ0AlyEYCFOJCb+hs9JJzBxm9fo20VafW8MApPVF0LwEatid/yGfq6LSMaLR/U7WntCV6rvBR 0FC+JeOAro1Oy57wlkbwtgZNgN5hHhLG1ebiaJ X-Google-Smtp-Source: ABdhPJzustyhdxMhYn8W4urAmhUJ+Ksv1VypAJY2DP4Goeyv1tUM7odGw0DDthMY0y5GWMrSmE2QWw== X-Received: by 2002:aa7:d553:0:b0:416:4dfc:126d with SMTP id u19-20020aa7d553000000b004164dfc126dmr20274228edr.213.1647259920907; Mon, 14 Mar 2022 05:12:00 -0700 (PDT) Received: from [10.137.0.18] (ip-86-49-251-241.net.upcbroadband.cz. [86.49.251.241]) by smtp.gmail.com with ESMTPSA id m26-20020a1709060d9a00b006da81fb9d72sm6662092eji.100.2022.03.14.05.12.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Mar 2022 05:12:00 -0700 (PDT) Message-ID: Date: Mon, 14 Mar 2022 13:11:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: Column Filtering in Logical Replication Content-Language: en-US To: "houzj.fnst@fujitsu.com" , Amit Kapila 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> From: Tomas Vondra 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/14/22 12:12, 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. > Yeah, a test would be nice - I'll take a look later. Anyway, the fix does not address tablesync, as explained in [1]. I'm not sure what to do about it - in principle, we could calculate which relations to sync, and then eliminate "duplicates" (i.e. relations where we are going to sync an ancestor). regards [1] https://www.postgresql.org/message-id/822a8e40-287c-59ff-0ea9-35eb759f4fe6%40enterprisedb.com -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company