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 1oDmIa-0006bT-Ry for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Jul 2022 12:26:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oDmIY-0007FN-CE for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Jul 2022 12:25:58 +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 1oDmIY-0007F7-1h for pgsql-hackers@lists.postgresql.org; Tue, 19 Jul 2022 12:25:58 +0000 Received: from mail-yb1-xb2c.google.com ([2607:f8b0:4864:20::b2c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oDmIV-0000Aa-Rc for pgsql-hackers@lists.postgresql.org; Tue, 19 Jul 2022 12:25:57 +0000 Received: by mail-yb1-xb2c.google.com with SMTP id 75so26159449ybf.4 for ; Tue, 19 Jul 2022 05:25:55 -0700 (PDT) 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=wBQ/mCNNX45GudEytdsGu9Sp7+FbIMMuHAYulolAX50=; b=UJ/95XnJP7o26DB9WqQHfApqhfBXQR3BCgn+0CXdd3+3Jn+a/eqN/kv0iTjUa/h/Vi fEtpqBZIKeb4lvXu16KC7voX14J3VpDoBupzgS2GLNYmJdUoFgKJzJDZZ52Fk7foWFvI RRglaVid6+wXvtK0e0QjuLBTTGsfza9LIMm0x23kVcZ19nZ58oRpcSKH2yC7iJXd8Xwd 8vwHVOv8nHq87itiIwALPqI76yjguzyZE/sZ0BxuVT1f+pPaUo0KQ/x+Z7z+2FL9dh4L 2rfIEjxrPNKF1XQejgUubygzD0fcW+8uDUrYheW2bjLqIGUgSfYlRrt8ziJhI8ryQuL9 2XyQ== 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=wBQ/mCNNX45GudEytdsGu9Sp7+FbIMMuHAYulolAX50=; b=dshlPwMrgd5Y1vhA4Uy5dk6RO7pauZ5+TgWPZjMykfmfLrihU1W0/7u03Zh55WjMv7 NkLDmyra39RQNinJCjkTIRcdb0SvgonT25BpsdZVYvYCl1Qt5847ZTLbOOTdIfhNYTtD 4k8qi0mv2Mvs5d1qzXjKe+JJMU464HSUXQsObXwiAxVzb7+U2YpUe95KFXamsQb/Oy3r JX0E4A55qto4/0vifZ9tw3dIHKsNm8iwb9iGOUUUGXme1VJgOiUMv6FqTun4M78OImaD vAXMJUfvXwP4kJQVjFrjGsnlkRX7drW0iRLYWvQ4JwkWs+cOVvYd4Y46Nw42ulDNdM53 LHTg== X-Gm-Message-State: AJIora932zl0Fvpze/IPSEijX6hgpG9P2M5SHnaFc8iDcCRKcHF91saJ q4nRyk4Wf/95gYoTSUT/c5/qu2ryNq3fuwAgdeg= X-Google-Smtp-Source: AGRyM1upZDwzwEX6aONA56/xRJZ6IkW4XrIuRX6saya5Ie7ky4i5XQjCOGGSIPMvvu897A3zskNl8Izyk4IUk53vcyw= X-Received: by 2002:a25:6f83:0:b0:668:b531:cefd with SMTP id k125-20020a256f83000000b00668b531cefdmr31371645ybc.495.1658233553790; Tue, 19 Jul 2022 05:25:53 -0700 (PDT) MIME-Version: 1.0 References: <20211008.165055.1621145185927268721.horikyota.ntt@gmail.com> <20220523.133323.444599955292141474.horikyota.ntt@gmail.com> In-Reply-To: From: Amit Kapila Date: Tue, 19 Jul 2022 17:55:42 +0530 Message-ID: Subject: Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns To: Masahiko Sawada Cc: "shiy.fnst@fujitsu.com" , Kyotaro Horiguchi , "Drouvot, Bertrand" , PostgreSQL Hackers , "Oh, Mike" Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jul 19, 2022 at 1:10 PM Masahiko Sawada wrote: > > On Mon, Jul 18, 2022 at 8:49 PM Amit Kapila wrote: > > > > On Sun, Jul 17, 2022 at 6:29 PM Masahiko Sawada wrote: > > > > > > On Fri, Jul 15, 2022 at 3:32 PM shiy.fnst@fujitsu.com > > > wrote: > > > > > > > > > > I've attached patches for all supported branches including the master. > > > > > > > For back branch patches, > > * Wouldn't it be better to move purge logic into the function > > SnapBuildPurge* function for the sake of consistency? > > Agreed. > > > * Do we really need ReorderBufferInitialXactsSetCatalogChanges()? > > Can't we instead have a function similar to > > SnapBuildXidHasCatalogChanges() as we have for the master branch? That > > will avoid calling it when the snapshot > > state is SNAPBUILD_START or SNAPBUILD_BUILDING_SNAPSHOT > > Seems a good idea. We would need to pass the information about > (parsed->xinfo & XACT_XINFO_HAS_INVALS) to the function but probably > we can change ReorderBufferXidHasCatalogChanges() so that it checks > the RBTXN_HAS_CATALOG_CHANGES flag and then the initial running xacts > array. > Let's try to keep this as much similar to the master branch patch as possible. > BTW on backbranches, I think that the reason why we add > initial_running_xacts stuff to ReorderBuffer is that we cannot modify > SnapBuild that could be serialized. Can we add a (private) array for > the initial running xacts in snapbuild.c instead of adding new > variables to ReorderBuffer? > While thinking about this, I wonder if the current patch for back branches can lead to an ABI break as it changes the exposed structure? If so, it may be another reason to change it to some other way probably as you are suggesting. -- With Regards, Amit Kapila.