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 1nSVzM-0004JF-ST for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Mar 2022 03:30:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nSVzL-00054k-H2 for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Mar 2022 03:30:47 +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 1nSVzL-00054W-6L for pgsql-hackers@lists.postgresql.org; Fri, 11 Mar 2022 03:30:47 +0000 Received: from mail-yb1-xb31.google.com ([2607:f8b0:4864:20::b31]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nSVzI-0000dT-Ke for pgsql-hackers@postgresql.org; Fri, 11 Mar 2022 03:30:46 +0000 Received: by mail-yb1-xb31.google.com with SMTP id f38so14850549ybi.3 for ; Thu, 10 Mar 2022 19:30:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3Vd1fWJDXhqtMRrZwK9uoZK+5CIRp3HZzeAmSO8WmyE=; b=Y0fe3t+Y5u4QJEpfDfSon21m0KAND5hEKPtg1tDFeYrK5OHde7R0KsVepzUVpTJasP vwkf7n02zC3X4CtbV2upT3CvynAHJg3jPf3vxWpejrceB220ni/TlxvtDdHY5z04HAot MTAUEKdq/Pz1K65Xmo3f/1wAdmSEaInX5M4UGZyoiptu72cFobMQrKoaB5dkQSKcGDgl ls+H4aRGi1TWBrKM4baRLs/NK2yNSHaI8JgHp3ChcxDMfESomQDb+eopiehp9pykoqFf lJyI89f4FS9ECaMCfzH2G7zZmKQNbBplNhcx/qch2kPNzVoOgl/spnWI4+a5Ns1H+xII ig8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3Vd1fWJDXhqtMRrZwK9uoZK+5CIRp3HZzeAmSO8WmyE=; b=pUTpUv+66tsCxpam0oJgYxRT8vU6udmx5PLp06LGALuH9IGizpvg0D9u9wFreGVKT5 MfXRx6Xj/5FXieetxdypNxnQLFCNlpIqnBo8u7Vwzk0+nlQL1ZvVW/4b05aqqFrKxUam G/6lcQ+tAV2xlUIQ/CWqS1D2EIBFuN8M4m/qCq7tUT44SiCn3xd/4NNLATynT39tP8I2 tMYFr/Q9uwFimyEfSuvKLpc040h2ngXsetgQuI4HyEGBGxqwAebwkw+brjAdUxUM9Fmb 2xHfF8iHEmvKWP0lQukp0Enh8zYhRXhFAYYNjCoNyj7ngxKIjRz7FhUQs3rfZf1cDZdt IK9w== X-Gm-Message-State: AOAM53176xzV1SbkHGllDzcEC8Ip0xPgf4DJD1MzBG6LIy0tyAKYE1cO ROHYvl5+hrKp6AH4MU+oveVsdeepTmZYQ+WkeHs= X-Google-Smtp-Source: ABdhPJzwm9QoACvx/ec4PwLPK3eunzlZWSuWtpmsP5W4nRvAzeKaK3ne8YgT7C0CY/QkXC0tjoeLdSRrKxyBwCZM4qw= X-Received: by 2002:a5b:906:0:b0:628:d6f7:4bdd with SMTP id a6-20020a5b0906000000b00628d6f74bddmr6706968ybq.349.1646969442607; Thu, 10 Mar 2022 19:30:42 -0800 (PST) MIME-Version: 1.0 References: <202201120041.p24wvsfcsope@alvherre.pgsql> <78b8d385-57cb-9a3f-cfe5-9f300f15eced@enterprisedb.com> <822a8e40-287c-59ff-0ea9-35eb759f4fe6@enterprisedb.com> In-Reply-To: <822a8e40-287c-59ff-0ea9-35eb759f4fe6@enterprisedb.com> From: Amit Kapila Date: Fri, 11 Mar 2022 09:00:31 +0530 Message-ID: Subject: Re: Column Filtering in Logical Replication To: Tomas Vondra Cc: "houzj.fnst@fujitsu.com" , Peter Eisentraut , Alvaro Herrera , Justin Pryzby , Rahila Syed , Peter Smith , pgsql-hackers , "shiy.fnst@fujitsu.com" Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Mar 11, 2022 at 7:26 AM Tomas Vondra wrote: > > But this does not address tablesync.c :-( That still copies everything, > because it decides to sync both rels (test_pub_part_1, test_pub_part_2), > with it's row filter. On older releases this would fail, because we'd > start two workers: > Yeah, this is because of the existing problem where we sync both rels instead of one. We have fixed some similar existing problems earlier. Hou-San has reported a similar case in another email [1]. > > But I find this really weird - I think it's reasonable to expect the > sync to produce the same result as if the data was inserted and > replicated, and this just violates that. > > Shouldn't tablesync calculate a list of relations in a way that prevents > such duplicate / overlapping syncs? > Yes, I think it is better to fix it separately than to fix it along with row filter or column filter work. > In any case, this sync issue looks > entirely unrelated to the column filtering patch. > Right. [1] - https://www.postgresql.org/message-id/OS0PR01MB5716DC2982CC735FDE388804940B9%40OS0PR01MB5716.jpnprd01.prod.outlook.com -- With Regards, Amit Kapila.