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 1nR5QV-0000mt-FD for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Mar 2022 04:56:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nR5QT-0007Sm-U8 for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Mar 2022 04:56:53 +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 1nR5QT-0007Sc-J3 for pgsql-hackers@lists.postgresql.org; Mon, 07 Mar 2022 04:56:53 +0000 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nR5QN-0001Kp-Ry for pgsql-hackers@lists.postgresql.org; Mon, 07 Mar 2022 04:56:52 +0000 Received: by mail-qk1-x731.google.com with SMTP id d194so1410695qkg.5 for ; Sun, 06 Mar 2022 20:56:47 -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=npSbJ5W4HueLllG7gaOvotc4uX8YWE/2kdBOgIaNdZc=; b=m7nYpJf5u2FlAr+vpG86fNQpFhyc5YqayPotZQ2EeVUn+g3HGlWAbLpAowBIyI5GUE v4NYSoL1XZ2IVqqmptmCraJjh0gKNxBCCDHVGQlkToUklE5tPuYGpYntSt3353/hdL54 0mfCevX3BkYwOmoAtfMmnJAKIM5wB2ccrWqad6Md++Nna9lpu2ez4pFtribp8Sr0Twl9 1DSFDTMFNAQ9KTVs3xFCK3ZsQotFoPkRmA48SfGE3hwVS1Sd00plCv6xB8NMx6Ca+kk8 cfvSce1uPSEtxZD5gcyxblTgU0BWduh8gwpaZL7zhwwmO8+HBbTngFxh7jwdDO79kZJ1 y7Og== 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=npSbJ5W4HueLllG7gaOvotc4uX8YWE/2kdBOgIaNdZc=; b=M5KRZ+2wvXPvM/R5xM6UY50fFURjHlv2FfYJcywbtcAfiJqRhDXudfnM/zITwEtyGp 3b9eDKhAi5n71inFmyb4azlfdpVXRXOqBefE3BVPWOTlxUlyFvl885Chw1qR1UjTm7w6 ovWbvwM5vhmtC2mv3HYtkTzEUVlsopB8EAOLAj+qrJHDi8sljk57F7SJug+tF1Co/PWO wqKHc6+lIPJeV7tKII0Y3HUV0zhHabeBoTmTsMbmRZPoklzGLKmEdM4WuKunZwuhw4xD vU6G0InLfDeiSYbA5136c2FOydHeZEkaYnNm6ojGyztrhxVHdeIXi3S94a3TsTMfPT3B 8E+A== X-Gm-Message-State: AOAM5308ze+Uf3Wr3BD0uAJxWhGfHj5k3YG3hB9ARXQAiGEmzWuT8rSH Pwmpv/Hq+tAoZxbtqvtHr47Iik+MaZWOrZkJjSE= X-Google-Smtp-Source: ABdhPJzmmDzUb6jTTO25Ru2WmkNp3xBUmnxLNDf+nIU8/zg+0/uIP76E1A8BRxOkEv7cR3EiWwyvATT+wfO2sZsWxyM= X-Received: by 2002:a37:a493:0:b0:46b:1df6:a85b with SMTP id n141-20020a37a493000000b0046b1df6a85bmr5820763qke.469.1646629006671; Sun, 06 Mar 2022 20:56:46 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Peter Smith Date: Mon, 7 Mar 2022 15:56:25 +1100 Message-ID: Subject: Re: Handle infinite recursion in logical replication setup To: vignesh C Cc: "kuroda.hayato@fujitsu.com" , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Vignesh, I also have not looked at the patch yet, but I have what seems like a very fundamental (and possibly dumb) question... Basically, I do not understand the choice of syntax for setting things up. IMO that "only-local" option sounds very similar to the other PUBLICATION ("publish") options which decide the kinds of things that will be published. So it feels more natural for me to think of the publisher as being the one to decide what will be published. e.g. option 1: CREATE PUBLICATION p1 FOR TABLE t1; CREATE SUBSCRITION s1 ... FOR PUBLICATION p1 WITH (only_local = true); option 2: CREATE PUBLICATION p1 FOR TABLE t1 WEHRE (publish = 'only_local'); CREATE SUBSCRITION s1 ... FOR PUBLICATION p1; ~~ IIUC the patch is using option 1. My first impression was it feels back-to-front for the SUBSCRIPTION telling the PUBLICATION what to publish. So, why does the patch use syntax option 1? ------ Kind Regards, Peter Smith Fujitsu Australia