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 1mimrs-00035s-1F for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Nov 2021 00:14:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mimrn-000084-ND for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Nov 2021 00:13:59 +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 1mimrn-00007v-Eo for pgsql-hackers@lists.postgresql.org; Fri, 05 Nov 2021 00:13:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mimrh-0000kp-VO for pgsql-hackers@lists.postgresql.org; Fri, 05 Nov 2021 00:13:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1A50Doxb364322; Thu, 4 Nov 2021 20:13:50 -0400 From: Tom Lane To: Alvaro Herrera cc: pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Fix WAL replay in presence of an incomplete record In-reply-to: References: Comments: In-reply-to Alvaro Herrera message dated "Wed, 29 Sep 2021 14:40:29 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <364320.1636071230.1@sss.pgh.pa.us> Date: Thu, 04 Nov 2021 20:13:50 -0400 Message-ID: <364321.1636071230@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk [ I'm working on the release notes ] Alvaro Herrera writes: > Fix WAL replay in presence of an incomplete record > ... > Because a new type of WAL record is added, users should be careful to > upgrade standbys first, primaries later. Otherwise they risk the standby > being unable to start if the primary happens to write such a record. Is there really any point in issuing such advice? IIUC, the standbys would be unable to proceed anyway in case of a primary crash at the wrong time, because an un-updated primary would send them inconsistent WAL. If anything, it seems like it might be marginally better to update the primary first, reducing the window for it to send WAL that the standbys will *never* be able to handle. Then, if it crashes, at least the WAL contains something the standbys can process once you update them. Or am I missing something? regards, tom lane