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 1ntMvl-0006zi-QE for pgsql-hackers@arkaria.postgresql.org; Tue, 24 May 2022 05:18:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ntMvk-000217-NJ for pgsql-hackers@arkaria.postgresql.org; Tue, 24 May 2022 05:18:04 +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 1ntMvk-00020y-ED for pgsql-hackers@lists.postgresql.org; Tue, 24 May 2022 05:18:04 +0000 Received: from mail-yw1-x112b.google.com ([2607:f8b0:4864:20::112b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ntMvg-00017J-4Y for pgsql-hackers@lists.postgresql.org; Tue, 24 May 2022 05:18:03 +0000 Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-2fed823dd32so169693807b3.12 for ; Mon, 23 May 2022 22:18:00 -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=be7zeYmFMbyO6M+ZNMIr3HrV1L6wMiy0PgEhPOU9Dgk=; b=nDWzdmG77P2JLQDor9enaKZVE8r1ebuqjLOJcHswNJw14kwhqtRglLvQC3OUU2WEPi KzT2WTYFhsXz9/HilzlAwwjoXJIV+t4exdDzniwardw/USgSXh8ZLIaRxrZ+MPk1xQJp Fm8QqmAK2pD4F1BecyyVt2E0JUNSIW/rvyYNIyV4symEdDvPj1uT18sGef3Cn0mu4WeK fd7vZdVvZMBdehFczRjiZkYPSkFjxy1fZ5fo58etuHXEs3CrPMzt5Tm7VrmSwpiGbz1q arkbgRVF5ROJHOVv2gzcq57Zzbiz6/0GwGbU+H+vjSFhIjb274Jx4ohpaMFG7pTNzNyK fIWg== 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=be7zeYmFMbyO6M+ZNMIr3HrV1L6wMiy0PgEhPOU9Dgk=; b=S9V1zGT+YLjTFN9dIKjvUncZL5DZqLmwmTDwdIVl+kOAyzz31lLWt38BPBleUxJiOh WjUBvcS1tZ4hx144y/s9wWjk04Pvj8AMOxf8RCmUd0cbvzyZOGv9gU/wCnEicMjkgpSr O2gPTXjbfJdlcqJ2x1SUXUjfkilo7y5vkPtK7vUt4eNL+oIFlYiAUyqHJeipPlLTU2Yc 2CPynqt4GJeJ61aoxdCghThG+E9PnuKVinB8LusnJm2OpQ8jwq7uYhOwQ6yplfyHf3Eo Miq84VGznt5xU4IESHpO+9syzaSd5yGeyZTlKY3Cg2lZ8xBLEvmY2zp/ajuekhoZW69R SDXQ== X-Gm-Message-State: AOAM5331jSGP71MYuMJJ3Jiofq2+Feje3NC7mAUS3vMlSEEqycVUmOeD GnH78I2iyMe+NwGWM1ZHxEjgahIpghu9p1d3M1w= X-Google-Smtp-Source: ABdhPJzt92TaoLvKHsQAAsKgfXO7FeHf3ArsrD1nMSvgar53vNa60TWK5wycAXEcNtHM00J4wCwUZw7Li1WbY8h9+WQ= X-Received: by 2002:a0d:d747:0:b0:2ff:22b9:9281 with SMTP id z68-20020a0dd747000000b002ff22b99281mr26904853ywd.305.1653369479366; Mon, 23 May 2022 22:17:59 -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, 24 May 2022 10:47:49 +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: 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, May 24, 2022 at 7:58 AM Masahiko Sawada wrote: > > On Mon, May 23, 2022 at 2:39 PM Amit Kapila wrote: > > > > On Mon, May 23, 2022 at 10:03 AM Kyotaro Horiguchi > > wrote: > > > > > > 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? > > It seems to work, could you draft the patch? > I can help with the review and discussion. -- With Regards, Amit Kapila.