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 1qLJ35-002nR0-Ba for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Jul 2023 07:53:39 +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 1qLJ33-006U7U-T7 for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Jul 2023 07:53:37 +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 1qLJ33-006U7F-Fi for pgsql-bugs@lists.postgresql.org; Mon, 17 Jul 2023 07:53:37 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qLJ31-000rhF-38 for pgsql-bugs@lists.postgresql.org; Mon, 17 Jul 2023 07:53:36 +0000 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-9926623e367so611957166b.0 for ; Mon, 17 Jul 2023 00:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20221208.gappssmtp.com; s=20221208; t=1689580413; x=1692172413; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=ghqXrfVzwQjlcP8BHknNdz2Qm2Xg9xJQcWslMLZn8cI=; b=bXBi6PtjCVqXyzoALFraLswUpfHDk6w111ld96PClnkw4kYzEH5R5k0X1PSy4HjwEq vyZQCfvLBAXMcVnVNDL87fDCaJuO05GvHM8b25gmA+2hemLUL41Ufm9xHPlY/W+c6L57 jhkWemNoIxTaqvsywT9lDhGZLwio1fX+Govj1l2GAFzKn48Uo1bHh36zRxg50ldJaICu cfE7iBsFsIV2SoQMZzBwR0xLCap0qmJsRyk+OgvsPGeJMvSE6zrAySKEwUpZwFb0/9YG CSpuvefevnnLIB7aIh1d/QoL/ZIrOHm0nDbggzyskcmWTbH8QeQYbpvHRTjIrBb78tHJ d/gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689580413; x=1692172413; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ghqXrfVzwQjlcP8BHknNdz2Qm2Xg9xJQcWslMLZn8cI=; b=PK+C8iYwz32XwbjwxC5W/SwNhu7jNlsRLBdyjuQP87yfu+zvtXrnRoihkLzTFtPaRU xgnyxO9qvj1w3tEVV/cnMYh6FWBZc8eGq63usxN8/xcrlon3SYXYGMtoMc+3yllvQIjw 1lKy3UgvzMVzsAdOJSc173i6YnGtA3ksLAg2ktU18tnmXOJkXNInKMa9bqLKG56wxFSX prsx6h1lG3T/6xytswbJhekNPqQ33rb6Xp4gOSf2Kfy6PIQbVoLQEMJs485ujW4BrMxd 9L42RzpCToxnTErPs+rxUDFtMOcxvlz3Dx+MrXDMdOvKqgolagVEJmYvMAo+I6X6RvhJ 3BSQ== X-Gm-Message-State: ABy/qLY+6m2nBAPzAfUahF+ZNEkWitnFOK/q0RDCD7Jhzg3KXC2GMeA6 k7WMkSNwlMfsfg0ZoTkOeDHr2w== X-Google-Smtp-Source: APBJJlEOrCNx4i0/jitUxd7Y1RSZsViXjTAwJdSHSqpN3QJoQ4T3aQqwMtNtF0CxeLJ+Xk2XhZfPFw== X-Received: by 2002:a17:906:5fd0:b0:974:55a2:cb0b with SMTP id k16-20020a1709065fd000b0097455a2cb0bmr10332080ejv.55.1689580413450; Mon, 17 Jul 2023 00:53:33 -0700 (PDT) Received: from localhost.localdomain ([2001:871:5e:4fc2:f2f6:7179:233d:e889]) by smtp.gmail.com with ESMTPSA id b8-20020a170906038800b009893650453fsm8884197eja.173.2023.07.17.00.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 00:53:33 -0700 (PDT) Message-ID: Subject: Re: BUG #18025: Probably we need to change behaviour of the checkpoint failures in PG From: Laurenz Albe To: hargudekishor@gmail.com, pgsql-bugs@lists.postgresql.org Date: Mon, 17 Jul 2023 09:53:32 +0200 In-Reply-To: <18025-85e7e63f3ff93d40@postgresql.org> References: <18025-85e7e63f3ff93d40@postgresql.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2023-07-17 at 05:03 +0000, PG Bug reporting form wrote: > I have just witnessed the data loss scenario.=20 >=20 > Scenario is like, there was checkpoint operation failures going on the DB > server since last 8 hours which means no successful checkpoint happened i= n > the DB server since last 8 hours. Then DB server went into the crash mode > due to the exhausted disk space and did not came up as part of crash > recovery. Mistake #1: you did not monitor disk space. > Actually the victim had moved few WALs from the pg_wal to other > location and reimporting those wal on original location also did not solv= ed > the problem. Mistake #2: manually messing with the database directory. > DB server was not able to find out the valid checkpoint record. > The victim was not having the backup which he could use that backup to > recover the data with the help of available archived WALs. Mistake #0: no backup. > So , the victim > had only one option left in his hand that is pg_resetwal.=C2=A0 We have t= ried > every possible solution but did not worked so we did not left with more > choices other than pg_Resetwal Mistake #3: run pg_resetwal "We have tried every possible solution" sounds a bit like "we tried all the haphazard things that came to our mind". Sorry, this is not a bug, this is a pilot error. If PostgreSQL crashes because "pg_wal" runs out of disk space, you increase the disk space, start PostgreSQL and let it complete crash recovery. It is as simple as that. Yours, Laurenz Albe