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 1tlN29-00BQK0-TW for pgsql-admin@arkaria.postgresql.org; Fri, 21 Feb 2025 07:01:14 +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 1tlN28-003hkv-Cp for pgsql-admin@arkaria.postgresql.org; Fri, 21 Feb 2025 07:01:12 +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 1tlN27-003hkn-W5 for pgsql-admin@lists.postgresql.org; Fri, 21 Feb 2025 07:01:12 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tlN23-0022nU-0Q for pgsql-admin@lists.postgresql.org; Fri, 21 Feb 2025 07:01:11 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-439a4fc2d65so14762425e9.3 for ; Thu, 20 Feb 2025 23:01:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1740121264; x=1740726064; darn=lists.postgresql.org; h=mime-version:user-agent:references:in-reply-to:date:to:from:subject :message-id:from:to:cc:subject:date:message-id:reply-to; bh=Gyf/cdq+d9W5zrQ/GV6eR1Neb4eHtRzo5035SZt1dp0=; b=WEIw9chpUYBoQxlFjrBSYmgbd1V31CfLpQWroq6ZT1BCwQTBh+CZtikuN7gmpR6Zah tFN6EJiHCJwQrz6GNbO9ccU1CUqGUlGqM6hOZwaelEnGebzRJrtZYlqxphFiePqx3TiM iN8q6Jj5u/mNsLdtukGFWmuaHNnbxOYu7g6NjyufTGConDTYg1J0ljce5j5cEtFREmT7 BU5Ba2fK6/Qi11TjkGzpAUDUolzuU2fsHzP8ULPrxaulOLdrxXoJwSuBBIpzV99QmOEB 3fVZFflkdBbjghA0N94bOLVOWq1nJaFiDC/QP0SD7ffdC1BXIAw+9UfdSDLt7o8xppX0 Suaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740121264; x=1740726064; h=mime-version:user-agent:references:in-reply-to:date:to:from:subject :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Gyf/cdq+d9W5zrQ/GV6eR1Neb4eHtRzo5035SZt1dp0=; b=h0AgF1nuzqXfMXXzq1/Xbco+bYWxq0GywPiBivbVuezXW9ELIdamLb1vzOR6j/RQdu HA+XjoviJ69x8D/NH3hGjDoXD+JNBkGCESEKLYzKaM1ClQee2GYcXG1YwbIIWX7A0TxX e7BhIkgEQD8UZKffnuMPZACE2NN7KhQ/fBqx7WjwtOv2Y/x8r5XNUuMcgK9kANelACXH HxFgIoSpLGPYDEjH6Qq+QKjLiIPLSPMQYMWvBMxOhbIWFRBBBGaH6vlzuy8n23kQCvtY RnLgU69BJTzCtvFvcki45tN830NIFbMkkPzrSVLxGtHZqHiZe8GciZ6oQ2ob6Grj+INa +V8w== X-Forwarded-Encrypted: i=1; AJvYcCW2sDdNSKwRjFZjUk3AqRymKzjY1pWk6IBNwXsPMQjp3DuYKZp8S5mJraKjv7j8QJhu12IwmLf7xZUj/w==@lists.postgresql.org X-Gm-Message-State: AOJu0YweJXO9DvysddJy6t+qtfZo6ln4v+OdjZ/7eXGyXQ+JRtFayVuc 3lkhNJ2PHAZteKhejpI0FfxBxVkPJHyBjUTBIWfk2rk6cC1BuHv6C3KCNtC5/bpIcVQ4rAC5ybg wVdHIHdgHhVDnB5nFgo1AsQN04F/S5l0gJiFtwzmScHFBuS6gLprSzt2cB3oeUA== X-Gm-Gg: ASbGncv78FbiToYtBqsrq5MnxDNWkGWJzXov4YPlFcL95iQT5TlGt6zl6r5klW7sucV 6ZbKGQqO7azkBE18hOhn7sUifpXEoFqWxcMGLyM2aNJCwCMarkKia2S9iD6/VgkTODSEjsGAkrq Oe2FzZc0ncx82A5qoHbZOXqvkfcR5ocAwFxpNXJTQQhOTywaJQQMDG0R1Wn5QkxuDP/Vf6Cye9v 61Q3Y1muC6VX0di3D8HQ0mdJZYzodYyd16cnM+Spq+3Bg/7KLiDXcBU9a7OVvr5c5oYFbvL1bIr Y2MQ3Cw4OHrX9FRPobFiwFl8ZIE6ZWYCYfi7325CqQ== X-Google-Smtp-Source: AGHT+IGZg9YV9ehufLJX6RBhDzouZzS2sNt8hsUAmpTwASMVu3EqBwZuMD9u0F93a/8e2Dsj59LJtQ== X-Received: by 2002:a05:600c:46c9:b0:439:93d2:72b4 with SMTP id 5b1f17b1804b1-439ae1f159fmr19385255e9.16.1740121264071; Thu, 20 Feb 2025 23:01:04 -0800 (PST) Received: from localhost.localdomain ([41.66.98.54]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-439b02d8859sm8006945e9.16.2025.02.20.23.01.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Feb 2025 23:01:03 -0800 (PST) Message-ID: <2e7dbd8ea7707df4778026529ef35dbd6229b595.camel@cybertec.at> Subject: Re: May data be corrupted after an interrupted, but afterwards sucessfully replayed recovery? From: Laurenz Albe To: "Dietrich, Benjamin" , "pgsql-admin@lists.postgresql.org" Date: Fri, 21 Feb 2025 08:01:02 +0100 In-Reply-To: <236a0aa64b1c41dd8e305e64ca6d38b5@uni-tuebingen.de> References: <236a0aa64b1c41dd8e305e64ca6d38b5@uni-tuebingen.de> User-Agent: Evolution 3.54.3 (3.54.3-1.fc41) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2025-02-20 at 15:00 +0000, Dietrich, Benjamin wrote: > we have a cluster that crashed because of a full 'pg_wal' disk. > When it automatically tried to restart after failure, it went into recovery, > crashed again - this time in recovery - and stopped (see logs below [1]). > > The original problem is solved and the cluster now successfully started an > finished recovery. > But when I restarted the cluster it HINTed: > > 2025-02-20 09:26:57.615 CET [3982486] LOG: database system was interrupted > while in recovery at 2025-02-20 03:38:24 CET > 2025-02-20 09:26:57.615 CET [3982486] HINT: This probably means that some > data is corrupted and you will have to use the last backup for recovery. > > > My question is now, if there is still a chance that the data is corrupted, > although the interrupted recovery was successfully redone later? No, if you didn't take other steps to break the database, like remove files or run "pg_resetwal", everything should be in perfet order. Perhaps that hint should be defused to say "This could mean that..." > ---------------------- > [1] logs: > > 2025-02-20 03:38:18.278 CET [3767151] PANIC: could not write to file > "pg_wal/xlogtemp.3767151": No space left on device > [...] > 2025-02-20 03:38:23.867 CET [3863518] LOG: database system was interrupted; > last known up at 2025-02-20 03:34:49 CET > [...] > 2025-02-20 03:38:24.136 CET [3863518] FATAL: could not write to file > "pg_wal/xlogtemp.3863518": No space left on device > [...] > 2025-02-20 09:26:57.615 CET [3982486] LOG: database system was interrupted > while in recovery at 2025-02-20 03:38:24 CET > 2025-02-20 09:26:57.615 CET [3982486] HINT: This probably means that some > data is corrupted and you will have to use the last backup for recovery. > 2025-02-20 09:26:57.886 CET [3982486] LOG: database system was not properly > shut down; automatic recovery in progress > 2025-02-20 09:26:57.890 CET [3982486] LOG: redo starts at E8A/EB648078 > 2025-02-20 09:26:57.932 CET [3982486] LOG: redo done at E8A/EC19B6B0 system > usage: CPU: user: 0.00 s, system: 0.01 s, elapsed: 0.04 s > 2025-02-20 09:26:57.966 CET [3982484] LOG: checkpoint starting: > end-of-recovery immediate wait > 2025-02-20 09:26:58.061 CET [3982484] LOG: checkpoint complete: wrote 390 > buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.058 s, > sync=0.001 s, total=0.096 s; sync files=103, longest=0.001 s, average=0.001 > s; distance=26335 kB, estimate=26335 kB > 2025-02-20 09:26:58.068 CET [3982483] LOG: database system is ready to > accept connections That confirms that everything worked the way it should, and your database will be fine. Yours, Laurenz Albe -- *E-Mail Disclaimer* Der Inhalt dieser E-Mail ist ausschliesslich fuer den bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte, dass jede Form der Kenntnisnahme, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser E-Mail unzulaessig ist. Wir bitten Sie, sich in diesem Fall mit dem Absender der E-Mail in Verbindung zu setzen. *CONFIDENTIALITY NOTICE & DISCLAIMER *This message and any attachment are confidential and may be privileged or otherwise protected from disclosure and solely for the use of the person(s) or entity to whom it is intended. If you have received this message in error and are not the intended recipient, please notify the sender immediately and delete this message and any attachment from your system. If you are not the intended recipient, be advised that any use of this message is prohibited and may be unlawful, and you must not copy this message or attachment or disclose the contents to any other person.