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 1muqxi-00042w-84 for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Dec 2021 07:01:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1muqxg-0006WO-ME for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Dec 2021 07:01:56 +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 1muqxg-0006WF-9k for pgsql-hackers@lists.postgresql.org; Wed, 08 Dec 2021 07:01:56 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1muqxd-0005hd-PC for pgsql-hackers@lists.postgresql.org; Wed, 08 Dec 2021 07:01:55 +0000 Received: by mail-pf1-x435.google.com with SMTP id o4so1619323pfp.13 for ; Tue, 07 Dec 2021 23:01:53 -0800 (PST) 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=f+lOi7ymXYFhH8Av14n750x7P3bI8I/EIVTZq2SKWLo=; b=g86dK1vVlK6GtcyIkvodvwT5MQ52QsjNDO1F/M9gQg+PxvwP1ntbW4L2uOWm6XCRnF F7KLp6sSltwoNgYw8ImVz+Kdv13Y7cq0XoAP7NdtYUQBmNLEKpCnM80EM6kt8bcbpHv1 50tiO2Q3ZiX8RTkYQoqVJ9mDLDMJh9AHT/ngU6jGX8aHPEmzFSnJLSDsWJ+QHpcXkjSW I/lTXU7clJhAnD5OcGvArTeTz7kBjiz7OjcBHi+zKke+9buas2YWTUszVqpuZdp2G9hT /5JauTGrMNFtZaIAe9bC8L1q24pTX6xRpvwJeRicXYmIzVpaT4hkTImtJ4Sv51ypRdEZ hV4w== 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=f+lOi7ymXYFhH8Av14n750x7P3bI8I/EIVTZq2SKWLo=; b=8MzpUSU4ZAIegUOBDkSasgPM9T4QajpGxRzhHg2jFOCngrCg3fGQjwUcn2d9ihNA5m dPjR/BaD8a5F5/Ifk8sB03wo7Rjax3XJfOTaGLKwkGXBOVxF7+lAk0zS13eBsuKopPQT k5zdsbcSm2cWUF331OcQJWmiql6RzByKEIJKyBJ9Sad+NMTycjYIwqXNWwsF3S25dDpb 1PHZQs+v1XthssMBQ06f7oZFa+lvuW1xjBSGNtlvRFrpw6QghVujgHRPi8t5Kwn30H2Y +BC4ugp/0vbbyu7OWUexu+ONjzM36NyELpFrIGsP8MoK9XYBebcaqlNayfr8Dab5Ns1z kj8A== X-Gm-Message-State: AOAM533YV3Vlb4YK9rReJ9kK/GCMahFz7DqHxzAp4JuSxsXfU+llZ9In DJPNEyjjgD3Ch6dQAAE4Bbs= X-Google-Smtp-Source: ABdhPJwK9X8sLtjg7piXvmfFORketO4YRUl/ogq9iFw5mPD1/e/Itfmt8TtU5nElPkPEEYhv0d1ilg== X-Received: by 2002:a63:501f:: with SMTP id e31mr7544031pgb.250.1638946911536; Tue, 07 Dec 2021 23:01:51 -0800 (PST) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id x9sm4844965pjq.50.2021.12.07.23.01.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 07 Dec 2021 23:01:50 -0800 (PST) Date: Wed, 08 Dec 2021 16:01:47 +0900 (JST) Message-Id: <20211208.160147.251668990346907790.horikyota.ntt@gmail.com> To: michael@paquier.xyz Cc: bossartn@amazon.com, david@pgmasters.net, peter.eisentraut@2ndquadrant.com, andres@anarazel.de, pgsql-hackers@lists.postgresql.org, jtc331@gmail.com, robertmhaas@gmail.com Subject: Re: Make mesage at end-of-recovery less scary. From: Kyotaro Horiguchi In-Reply-To: <20211109.162751.1330179292938994347.horikyota.ntt@gmail.com> References: <20211108.145946.1513355777186578917.horikyota.ntt@gmail.com> <20211109.162751.1330179292938994347.horikyota.ntt@gmail.com> User-Agent: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Wed_Dec__8_16_01_47_2021_480)--" Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ----Next_Part(Wed_Dec__8_16_01_47_2021_480)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit At Tue, 09 Nov 2021 16:27:51 +0900 (JST), Kyotaro Horiguchi wrote in > This is the updated version. > > - emode_for_currupt_record() now uses currentSource instead of > readSource. > > - If zero record length is faced, make sure the whole header is zeroed > before deciding it as the end-of-WAL. > > - Do not overwrite existig message when missing contrecord is > detected. The message added here is seen in the TAP test log > 026_overwrite_contrecord_standby.log d2ddfa681db27a138acb63c8defa8cc6fa588922 removed global variables ReadRecPtr and EndRecPtr. This is rebased version that reads the LSNs directly from xlogreader instead of the removed global variables. regards. -- Kyotaro Horiguchi NTT Open Source Software Center ----Next_Part(Wed_Dec__8_16_01_47_2021_480)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="v7-0001-Make-End-Of-Recovery-error-less-scary.patch"