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 1nszl6-0003Z6-DW for pgsql-hackers@arkaria.postgresql.org; Mon, 23 May 2022 04:33:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nszl5-0007UE-9y for pgsql-hackers@arkaria.postgresql.org; Mon, 23 May 2022 04:33:31 +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 1nszl4-0007S7-Uv for pgsql-hackers@lists.postgresql.org; Mon, 23 May 2022 04:33:30 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nszl3-0001Bu-30 for pgsql-hackers@lists.postgresql.org; Mon, 23 May 2022 04:33:30 +0000 Received: by mail-pl1-x636.google.com with SMTP id i1so12024457plg.7 for ; Sun, 22 May 2022 21:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:message-id:to:cc:subject:from:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=n1dvidhb5g0sYPEEiEXNSuUXa4rP+ny/EceaVMdgiNk=; b=OJ6Y9Unkb9Za+7NTBfrDWIbnYxvWRo43lvP6pCagOkNCu5JwPqcrCNJlC10b0Fny6H R6RkZysphjdiZqq24X5zZIsrXD834mOWpVOdaHd9GGsVYk8tmLXYOnXcm33VbSvSswtV /m2vTm4WLH0gSUssbP9cy/jRL4TZ1ckicYLoj81HQOm4nwkB3JVhdw6cey3kQEvzCFL2 bbXqHvoz97QkXnDgGYxFnX+glpDnMMGQZ0t4b/s9RhRw8Rhqg2KaaPK8765EsW0HaKrs TnYNutgEU3liyyu5OQWf7B9+3ldTnAafaaf4mcYRj+XI0XoKF0Leo6z2Vx4FVUvDVuiU C6Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:to:cc:subject:from:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=n1dvidhb5g0sYPEEiEXNSuUXa4rP+ny/EceaVMdgiNk=; b=NdjlVv08XbArvZy90OEiR8W1MMJ301MAcDojH3oZm4t/8X2VLO05lu6ygHqM8tzxpt +uxxfoC+XOjV4KirVToNOg/m6Kk3+P7YJI6WFP2kx5LBgff/3T9Ip2eby0ug9XyhfzKk XtydsXoScrc2VVFqYmWna8pPoc0mGGpZ50+oGmfznsw86R4cQw9XdiyON1asuEkOhASG dr3hriJx1SV+9CX8PXdZobFgPmy8v1iZemGfr2w1A+j+3CuB9XP2svEP2BYyEb8X77Zc EU+tGWU75mng6MSrdLpei1qK0Hl1q6S3qLfau7AU3/zQ6+cq/jo6oocR64OTzaw7Xd/d V6eg== X-Gm-Message-State: AOAM533uW8oF2+Vw5fqb6oHIG3HBT679ERZewPQnbdb0KaExq76YGC1K jVTHddgiGx8VDBP88CcN6Ds= X-Google-Smtp-Source: ABdhPJzhXA4HS7HMYPOF22oKTYRuHJMVpXZmS0YIlm2E2nMVVF5ImPFD5SfgACs8Cq2/NpCrewc/ww== X-Received: by 2002:a17:903:248:b0:155:ecb7:dfaf with SMTP id j8-20020a170903024800b00155ecb7dfafmr21317748plh.84.1653280406320; Sun, 22 May 2022 21:33:26 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id y6-20020aa78546000000b0051844f3f637sm2844567pfn.40.2022.05.22.21.33.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 22 May 2022 21:33:25 -0700 (PDT) Date: Mon, 23 May 2022 13:33:23 +0900 (JST) Message-Id: <20220523.133323.444599955292141474.horikyota.ntt@gmail.com> To: amit.kapila16@gmail.com Cc: sawada.mshk@gmail.com, bdrouvot@amazon.com, pgsql-hackers@lists.postgresql.org, minsoo@amazon.com Subject: Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns From: Kyotaro Horiguchi In-Reply-To: References: <20211008.165055.1621145185927268721.horikyota.ntt@gmail.com> User-Agent: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk At Sat, 21 May 2022 15:35:58 +0530, Amit Kapila wrote in > I think if we don't have any better ideas then we should go with > either this or one of the other proposals in this thread. The other > idea that occurred to me is whether we can somehow update the snapshot > we have serialized on disk about this information. On each > running_xact record when we serialize the snapshot, we also try to > purge the committed xacts (via SnapBuildPurgeCommittedTxn). So, during > that we can check if there are committed xacts to be purged and if we > have previously serialized the snapshot for the prior running xact > record, if so, we can update it with the list of xacts that have > catalog changes. If this is feasible then I think we need to somehow > remember the point where we last serialized the snapshot (maybe by > using builder->last_serialized_snapshot). Even, if this is feasible we > may not be able to do this in back-branches because of the disk-format > change required for this. > > Thoughts? I didn't look it closer, but it seems to work. I'm not sure how much spurious invalidations at replication start impacts on performance, but it is promising if the impact is significant. That being said I'm a bit negative for doing that in post-beta1 stage. I thought for a moment that RUNNING_XACT might be able to contain invalidation information but it seems too complex to happen with such a frequency.. regards. -- Kyotaro Horiguchi NTT Open Source Software Center