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 1oE3wn-00068M-11 for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Jul 2022 07:16:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oE3wl-00038t-Ta for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Jul 2022 07:16:39 +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 1oE3wl-00038k-Ki for pgsql-hackers@lists.postgresql.org; Wed, 20 Jul 2022 07:16:39 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oE3wj-0003O4-Na for pgsql-hackers@lists.postgresql.org; Wed, 20 Jul 2022 07:16:38 +0000 Received: by mail-pj1-x1032.google.com with SMTP id bk6-20020a17090b080600b001f2138a2a7bso1720626pjb.1 for ; Wed, 20 Jul 2022 00:16:37 -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=vniUBX2BU12mz6ya85Sq7frDERYEb7JtaY1AVdwkIq0=; b=crUbVDD5qwyhC1Lj2NlqQbDoY4KCojE/MU7WBRY+7Eduv2bBhgtoAtd4JIHDUgcGP/ Zf0ncl7RmI52q14VrL836VpIbbxG8lDXNbTQy+dck4G+UaZPX1A11wuBr6GlwhkweFEr 83CKLiGT2mfco8yHZL0ef02huDKknr5p3yz9sINr/dO/ibpiu8guq0CQtN8ACtJ5frHb gzLu7Id60MPeFkNjpYcqNdGHQkyMfwQ3nqQNm6/kx/GenZY4/oheytdMEdZiVCQtIBNj cpguYAldPsBSvZK6WM6JZrrIdGeRxMIDeE5NgJl6vjz+qfymJULRDoZOUce02bGHPuPj SmDA== 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=vniUBX2BU12mz6ya85Sq7frDERYEb7JtaY1AVdwkIq0=; b=uBh4GbK3sXLIRbxjd4xZ7wQbNwY+sO+yF/33fsmXOU2VK9TNOT1CsQuL1utpiBNkj7 mSBeL1uBQSmhgUm6teTRh+PsSKf2AtgzU9C0HbOMT/IOaN8FZkJ2YtQMbqYDgIGosNKt pny1XYOgy/Hg5AzBAq6v1OEXhsq5UOs879F1exdQUwqea0LwI85LCP+fpcMUmCk57Frn NgK+UNbQ50koOCgOe+9UiqsWB8zVpAXMEfNB7EGCcj563dLaf9Sdu7GqCaFH2jWHx/kM p5DOlR0mpmvqEpZBtDmIJM10W1Q4WExJ9r9SFyoiUX9tR/THD5b4h0f8c55EcJXEwZjG V6NA== X-Gm-Message-State: AJIora/jegPEqOwu44QdQdZy/4n1njH81ZvX5pdbcEJjD8vVxqiNk/53 zfMN80808MqG9YT15K+0t4E= X-Google-Smtp-Source: AGRyM1urUnlAETO4Hgb42aVUphEJ4o8otEDL3lDVDc/2HkKOJs9bDLgNO6l3N0SOUoP/k4VANlvD9g== X-Received: by 2002:a17:90b:4c0b:b0:1ef:f525:97ba with SMTP id na11-20020a17090b4c0b00b001eff52597bamr3898851pjb.44.1658301396644; Wed, 20 Jul 2022 00:16:36 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id w196-20020a6282cd000000b0052b9747e0d1sm730505pfd.189.2022.07.20.00.16.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 20 Jul 2022 00:16:35 -0700 (PDT) Date: Wed, 20 Jul 2022 16:16:32 +0900 (JST) Message-Id: <20220720.161632.1015243011930700175.horikyota.ntt@gmail.com> To: sawada.mshk@gmail.com Cc: amit.kapila16@gmail.com, osumi.takamichi@fujitsu.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: <20220720.095808.772209644652657995.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 Wed, 20 Jul 2022 10:58:16 +0900, Masahiko Sawada wrote in > On Wed, Jul 20, 2022 at 9:58 AM Kyotaro Horiguchi > wrote: > > Mmm. the patch changed that behavior. AllocateSnapshotBuilder always > > allocate the array with a fixed size. SnapBuildAddCommittedTxn still > > assumes builder->committed.xip is non-NULL. SnapBuildRestore *kept* > > ondisk.builder.commited.xip populated with a valid array pointer. But > > the patch allows committed.xip be NULL, thus in that case, > > SnapBuildAddCommitedTxn calls repalloc(NULL) which triggers assertion > > failure. > > IIUC the patch doesn't allow committed.xip to be NULL since we don't > overwrite it if builder->committed.xcnt is 0 (i.e., > ondisk.builder.committed.xip is NULL): I meant that ondisk.builder.committed.xip can be NULL.. But looking again that cannot be. I don't understand what I was looking at at that time. So, sorry for the noise. regards. -- Kyotaro Horiguchi NTT Open Source Software Center