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 1nRGCg-0001b2-Pu for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Mar 2022 16:27:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nRGCe-000739-H1 for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Mar 2022 16:27:20 +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 1nRGCe-00072z-5v for pgsql-hackers@lists.postgresql.org; Mon, 07 Mar 2022 16:27:20 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nRGCb-0006rs-Mz for pgsql-hackers@lists.postgresql.org; Mon, 07 Mar 2022 16:27:19 +0000 Received: by mail-ej1-x635.google.com with SMTP id qt6so33114469ejb.11 for ; Mon, 07 Mar 2022 08:27:17 -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=ioFtEFVuxpWrrlWeUpmVBcucYWFJfpVoPkTtD0M85S8=; b=I+F34teLVHL7Qf6QsRof2fFikBWnd9QQ7kK0cn8L1Mz9oBIhV7LwPVk1xpINaZqJR4 Guwd8aYvQMBKs8QFpL1VLUsawNOCemh1Z1MfjKu8XncFAOcHwCTFDfL/5QmG8RAN1amx FeL8+LD6SGT/SWNEUBIcjbBQLbVzKLG9nDquEz/hBKPe06hMsRofzFLnWHNnwsmKepig hpICdipaLV5xmeRgWKzbzrjv0uHdJVrsK/eF6x4Fg41D39Acqg0jLV28LPwYF2G5FYmN iqdgnUNCZHQjigL4AF3z4ZJ51kUETdWkNatYLZXgdP7Yw7A/mHhrD+Wo5bZNRga92UAP DvIw== 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=ioFtEFVuxpWrrlWeUpmVBcucYWFJfpVoPkTtD0M85S8=; b=s229jHU3QNFT+L+HRGM4Yc1yLBHVnCU2zcasODsA2ehxo+up/wUnPRcupCBlz+dwAo 7qlfXnQrRiQKJQJl4wOtutPCDh4NoE1LkutmMe/9HVFtwrQ9VyRLjI1YJx/mh0fBsdxJ EepdoAWaUyslBaygdfoFeoaMiAMW1cNNcg5StuKsBEASNRWsFO5wt1GPn/bwVD0OxN7L W8NrXnQIbwew/CVFKRSNpYddb6we5KFgZJfEF0/fmC44DV6P+PBNG3gA+Jinybmz+tap 5bBkUHuEMnFd4ek7Utmm+SwWikAH4Q7Z0pipo8+zHZHeq1XVlsUJDr1h377NAnKShAG0 lPnw== X-Gm-Message-State: AOAM532FSrZSaHDKIdGc6W7dJ4pGGBhoFf1b5jShxKMLSVKd/G+Vm5nV rSX0q3IaSgWtFH8EHCcflo7F02BvksWiSi4FAJ4= X-Google-Smtp-Source: ABdhPJzXp6OCFHHuWbmr7MzfxrDvZAfTjucvX9NVd0L/6PZ3dgMXp9XOkwT+0ne6JgYx7UCYlNXv4bAUduAIVUMeAao= X-Received: by 2002:a17:906:c113:b0:6d7:7b53:9cb with SMTP id do19-20020a170906c11300b006d77b5309cbmr10177757ejc.197.1646670435265; Mon, 07 Mar 2022 08:27:15 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: vignesh C Date: Mon, 7 Mar 2022 21:57:03 +0530 Message-ID: Subject: Re: Handle infinite recursion in logical replication setup To: Amit Kapila Cc: Ashutosh Bapat , Peter Smith , "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 On Mon, Mar 7, 2022 at 5:51 PM Amit Kapila wrote: > > On Mon, Mar 7, 2022 at 5:01 PM Ashutosh Bapat > wrote: > > > > Hi Vignesh, > > I agree with Peter's comment that the changes to > > FilterRemoteOriginData() should be part of FilterByOrigin() > > > > Further, I wonder why "onlylocal_data" is a replication slot's > > property. A replication slot tracks the progress of replication and it > > may be used by different receivers with different options. I could > > start one receiver which wants only local data, say using > > "pg_logical_slot_get_changes" and later start another receiver which > > fetches all the data starting from where the first receiver left. This > > option prevents such flexibility. > > > > As discussed earlier in the thread, local_only can be property of > > publication or subscription, depending upon the use case, but I can't > > see any reason that it should be tied to a replication slot. > > > > I thought it should be similar to 'streaming' option of subscription > but may be Vignesh has some other reason which makes it different. Yes, this can be removed from the replication slot. It is my mistake that I have made while making the code similar to two-phase, I'm working on making the changes for this. I will fix and post an updated version for this. Regards, Vignesh