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 1nn0GC-0002ay-U2 for pgsql-hackers@arkaria.postgresql.org; Fri, 06 May 2022 15:52:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nn0GB-0005IP-Nv for pgsql-hackers@arkaria.postgresql.org; Fri, 06 May 2022 15:52:51 +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 1nn0GB-0005Ej-Co for pgsql-hackers@lists.postgresql.org; Fri, 06 May 2022 15:52:51 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nn0G9-00031Q-07 for pgsql-hackers@lists.postgresql.org; Fri, 06 May 2022 15:52:50 +0000 Received: by mail-pj1-x1036.google.com with SMTP id gj17-20020a17090b109100b001d8b390f77bso11187082pjb.1 for ; Fri, 06 May 2022 08:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=MUHTnHg3+fe6I4LsjbiukO4s5/UX59628lwO13UceVo=; b=TBukan50bKWHYKnTlIsnMZBKD7eivzUyRsYLVBqoK7Zj9YIeiPALzhLVxMoGbTSvdD nQWszx5aTz6kK8lTs7a019r0bBftqfsSaop+EM7Yc94gp6c7beEpDEoRyrLx3QNKbE7Z UOEmsIHc/0WL/XF0esBYfCQFffsR1mimYxVu+I7WIKQg0bMtZdbL/JUv10Kc6EF+7y21 PA6f5KFRTzwwp3JPCYsleud9dAxagr11T4l7zqptESIb61W8KaNiAYU/vFnNgMtU5obi FvgjayICqMHtLmqWUv3azcDyGWe/44GP60XWermJOgtRZ7t8T6K0nVTSvMEX9ceoErzf aQUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=MUHTnHg3+fe6I4LsjbiukO4s5/UX59628lwO13UceVo=; b=7W3fpKdudvSuwBtfVPDC1yRCTZe5G7Am+OICfMaWzynDytfpkjbLsSVswKILqobsOO nDO7+ukvs9gv7zNr1GKXwgZmmuwv4TAasqM/JYaYiTXoXB1lGVMObWop/qRyVLNR8WLv 0ZOWR65XM+TNlWyp4GL39rf9KJoyE4G3WvjGzmeb4KltUDoZgj1FrRw/loLcWzucW2Ky FcG4mfFibpv9+SpZtGSsn5m+XbvjM1cf+OUfZCNfXSe6e6T7PCBWEVBRzPySum2Wg6VX JWieNt21mV7TLw7CPJFwcPn67x+Sb6LbJxcVqZFgH10lQeUn0LaDKnJvxEiI0aWfcMor mpzw== X-Gm-Message-State: AOAM530WcLWqMMBLwApvjKP+WKVvmz7Qm4jUMeMO4jf0ZgUxrU+DLAxR Abw2TUO1hrWdcOgHsV/xvi0= X-Google-Smtp-Source: ABdhPJy7MJQzyPd+xZ2gRKXDYRqKoqI9/ql6rLK5H21lEkBjj2kdZgbL2oFnj4u+mDwY8fVPUqL8UQ== X-Received: by 2002:a17:902:7d93:b0:14d:d401:f59b with SMTP id a19-20020a1709027d9300b0014dd401f59bmr4362411plm.14.1651852367787; Fri, 06 May 2022 08:52:47 -0700 (PDT) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id i6-20020a170902cf0600b0015e8d4eb2e1sm1898377plg.299.2022.05.06.08.52.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 May 2022 08:52:47 -0700 (PDT) Date: Fri, 6 May 2022 08:52:45 -0700 From: Nathan Bossart To: Michael Paquier Cc: Kyotaro Horiguchi , pgsql-hackers@lists.postgresql.org, masao.fujii@oss.nttdata.com Subject: Re: Possible corruption by CreateRestartPoint at promotion Message-ID: <20220506155245.GA3447568@nathanxps13> References: <20220427180945.GA3222843@nathanxps13> <20220428.114357.476887320744154615.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, May 06, 2022 at 07:58:43PM +0900, Michael Paquier wrote: > And I have spent a bit of this stuff to finish with the attached. It > will be a plus to get that done on HEAD for beta1, so I'll try to deal > with it on Monday. I am still a bit stressed about the back branches > as concurrent checkpoints are possible via CreateCheckPoint() from the > startup process (not the case of HEAD), but the stable branches will > have a new point release very soon so let's revisit this choice there > later. v6 attached includes a TAP test, but I don't intend to include > it as it is expensive. I was looking at other changes in this area (e.g., 3c64dcb), and now I'm wondering if we actually should invalidate the minRecoveryPoint when the control file no longer indicates archive recovery. Specifically, what happens if a base backup of a newly promoted standby is used for a point-in-time restore? If the checkpoint location is updated and all previous segments have been recycled/removed, it seems like the minRecoveryPoint might point to a missing segment. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com