Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r4LLe-008Kjd-BA for pgsql-hackers@arkaria.postgresql.org; Sat, 18 Nov 2023 13:26:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r4LLc-000ulS-RG for pgsql-hackers@arkaria.postgresql.org; Sat, 18 Nov 2023 13:26:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r4LLc-000ulK-Hs for pgsql-hackers@lists.postgresql.org; Sat, 18 Nov 2023 13:26:56 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r4LLa-00746V-EW for pgsql-hackers@postgresql.org; Sat, 18 Nov 2023 13:26:55 +0000 Received: from [10.5.0.2] (unknown [45.14.195.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 4F81654680; Sat, 18 Nov 2023 13:26:51 +0000 (UTC) Message-ID: <241ccde1-1928-4ba2-a0bb-5350f7b191a8@pgmasters.net> Date: Sat, 18 Nov 2023 09:26:40 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Use of backup_label not noted in log To: Andres Freund , pgsql-hackers@postgresql.org, Michael Paquier References: <20231117041811.vz4vgkthwjnwp2pp@awork3.anarazel.de> Content-Language: en-US From: David Steele In-Reply-To: <20231117041811.vz4vgkthwjnwp2pp@awork3.anarazel.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/17/23 00:18, Andres Freund wrote: > > I've often had to analyze what caused corruption in PG instances, where the > symptoms match not having had backup_label in place when bringing on the > node. However that's surprisingly hard - the only log messages that indicate > use of backup_label are at DEBUG1. > > Given how crucial use of backup_label is and how frequently people do get it > wrong, I think we should add a LOG message - it's not like use of backup_label > is a frequent thing in the life of a postgres instance and is going to swamp > the log. And I think we should backpatch that addition. +1 for the message and I think a backpatch is fine as long as it is a new message. If monitoring systems can't handle an unrecognized message then that feels like a problem on their part. > Medium term I think we should go further, and leave evidence in pg_control > about the last use of ControlFile->backupStartPoint, instead of resetting it. Michael also thinks this is a good idea. > I realize that there's a discussion about removing backup_label - but I think > that's fairly orthogonal. Should we go with the pg_control approach, we should > still emit a useful message when starting in a state that's "equivalent" to > having used the backup_label. Agreed, this new message could easily be adapted to the recovery in pg_control patch. Regards, -David