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 1r4LOp-008Kw5-6n for pgsql-hackers@arkaria.postgresql.org; Sat, 18 Nov 2023 13:30:15 +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 1r4LOn-000ytG-BJ for pgsql-hackers@arkaria.postgresql.org; Sat, 18 Nov 2023 13:30:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r4LOn-000yt5-1B for pgsql-hackers@lists.postgresql.org; Sat, 18 Nov 2023 13:30:13 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r4LOk-006Aqi-Jk for pgsql-hackers@postgresql.org; Sat, 18 Nov 2023 13:30:11 +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 1D64F54680; Sat, 18 Nov 2023 13:30:08 +0000 (UTC) Message-ID: <87bb6850-1a9c-4f78-948e-44efade98443@pgmasters.net> Date: Sat, 18 Nov 2023 09:30:01 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Use of backup_label not noted in log Content-Language: en-US To: Laurenz Albe , Andres Freund , pgsql-hackers@postgresql.org, Michael Paquier References: <20231117041811.vz4vgkthwjnwp2pp@awork3.anarazel.de> From: David Steele In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/17/23 01:41, Laurenz Albe wrote: > On Thu, 2023-11-16 at 20:18 -0800, 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 > > I am not sure about the backpatch: it is not a bug, and we should not wantonly > introduce new log messages in a minor release. Some monitoring system may > get confused. > > What about adding it to the "redo starts at" message, something like > > redo starts at 12/12345678, taken from control file > > or > > redo starts at 12/12345678, taken from backup label I think a backpatch is OK as long as it is a separate message, but I like your idea of adding to the "redo starts" message going forward. I know this isn't really a bug, but not being able to tell where recovery information came from seems like a major omission in the logging. Regards, -David