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 1nIAgu-0000qM-2F for pgsql-bugs@arkaria.postgresql.org; Thu, 10 Feb 2022 14:45:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nIAgs-0008Jj-Uf for pgsql-bugs@arkaria.postgresql.org; Thu, 10 Feb 2022 14:44:58 +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 1nIAgs-0008Ja-Kj for pgsql-bugs@lists.postgresql.org; Thu, 10 Feb 2022 14:44:58 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nIAgq-0004GI-5I for pgsql-bugs@lists.postgresql.org; Thu, 10 Feb 2022 14:44:58 +0000 Received: by mail-pj1-x102b.google.com with SMTP id d9-20020a17090a498900b001b8bb1d00e7so5763506pjh.3 for ; Thu, 10 Feb 2022 06:44:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=/Mwj2n1h9LeJeq5SLJZCClcyEZACjs+ECsggy3KxBuU=; b=R0o7N79zQQ8Rv9r/0kOQnuDlrvuSzkF0MFIZCZpa36p/CoWcICxGNHNj0dBp4YbIAb c4Q6YM7AvptP7iIudhZiH1spgUXp3yHSf/8b5JSubl9f/tkuXi5oC1pk622ApTQ//JzA NabVd5IjU3JkC0WiIaPMgpXCJ5AXI86J1eWhc/zIG3L3Ec3wDMm2iuJxkx/NxgOw3BTs 8iJi63GWY3sXgAAf0c2MKBoacONd9x44vYNt02mp7zhWV7hcn19Q9t/X2RRYQMUPQ28e VB8OM9eauvBHopb8/TK2gLj/JkoWoarvJTB9bX810ROtZ5nFJs9LSIOic7hr+CCIAL02 GqbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=/Mwj2n1h9LeJeq5SLJZCClcyEZACjs+ECsggy3KxBuU=; b=UGVgOD7gIURNurITjlNATDdaF52N9ZmIyplLdhT72bh4bN2t10tAzgXwDkHegBgzh+ fohjksECX6G4Y+MKRoF/YsxXab1jOT22qS6WIUGugdqME8x9Sxw5cHQyYqh9LX195a3S 6BeRY7aYmk7RFYhkTNGSUtctSy9Bszn9K/rEBcHZe4nh0uFsVj85HlMJsGTauF0/H/E9 8Ke8nNiqjY1b+/CaRwH70m3YeY0nXyf8iRnPD13sGV6y8jiXYjzX045CinqdFE42DRAC XFsoNrO685LjD6VLwPaQGcknpbQHo0Vo59xIsI1st4yKaP+ADcHK4woeKutOQq+BL8JL Dozw== X-Gm-Message-State: AOAM5335LXN2a4qLJ4zHongvvj76S3xotPU0Ze8zDVTMrqK9F8qrJFUk kp7nBIcr35ndafWGW1uzfq0= X-Google-Smtp-Source: ABdhPJy0hmAmvq/4lJyMBRBbq+QxpLER8XjB/COXE2CLScpFCmXJt14uAcqLq3DE1vQ7aDq+x7bVRQ== X-Received: by 2002:a17:903:2310:: with SMTP id d16mr7750890plh.39.1644504293782; Thu, 10 Feb 2022 06:44:53 -0800 (PST) Received: from jrouhaud (2001-b011-1005-1017-0d03-b328-2e39-2b88.dynamic-ip6.hinet.net. [2001:b011:1005:1017:d03:b328:2e39:2b88]) by smtp.gmail.com with ESMTPSA id f22sm24301570pfj.206.2022.02.10.06.44.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 06:44:53 -0800 (PST) Date: Thu, 10 Feb 2022 22:44:50 +0800 From: Julien Rouhaud To: "Silaparasetti, Ramesh" Cc: "pgsql-bugs@lists.postgresql.org" , "Kishore, Nanda - Dell Team" , "Mahendrakar, Prabhakar - Dell Team" , "Agarwal, Pragati - Dell Team" Subject: Re: Very URGENT REQUEST - Postgresql error : PANIC: could not locate a valid checkpoint record Message-ID: <20220210144450.o5nd6gcdt7qlittt@jrouhaud> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Feb 10, 2022 at 01:13:27PM +0000, Silaparasetti, Ramesh wrote: > > 1. Below is the output of the command : "\services\datastore\engine\bin\pg_controldata.exe -D "\services\datastore\data"" > C:\Program Files\EMC\DPA\services\datastore\engine\bin>pg_controldata.exe -D "F:\datastore\data\data" > pg_control-Versionsnummer: 1300 > Katalogversionsnummer: 202007201 > Datenbanksystemidentifikation: 7054941472659574120 > Datenbank-Cluster-Status: heruntergefahren > pg_control zuletzt geändert: 07.02.2022 14:57:30 > Position des letzten Checkpoints: 9/C80000D8 > REDO-Position des letzten Checkpoints: 9/C80000D8 > REDO-WAL-Datei des letzten Checkpoints: 0000000100000009000000C8 > [...] > 2. As you suggested, we verified the value of Latest checkpoint's REDO WAL file: 0000000100000009000000C8. > > This WAL file does not exist at the pg_wal directory. > We have enabled debug logging and below is the logging information from Postgres. > > 2022-02-10 11:38:05.675 CET [7916] LOG: starting PostgreSQL 13.1, compiled by Visual C++ build 1900, 64-bit > 2022-02-10 11:38:05.679 CET [7916] LOG: listening on IPv4 address "127.0.0.1", port 9003 > 2022-02-10 11:38:05.681 CET [7916] LOG: listening on IPv4 address "10.91.198.36", port 9003 > 2022-02-10 11:38:06.756 CET [348] LOG: database system was shut down at 2022-02-07 14:57:30 CET > 2022-02-10 11:38:06.756 CET [348] DEBUG: mapped win32 error code 2 to 2 > 2022-02-10 11:38:06.757 CET [348] DEBUG: mapped win32 error code 2 to 2 > 2022-02-10 11:38:06.757 CET [348] DEBUG: could not open file "pg_wal/0000000100000009000000C8": No such file or directory So, unless you can find that 0000000100000009000000C8 file (and all the files after that), your instance is corrupted and you lost data. If you have WAL archiving or streaming to another location you should be able to recover from that, assuming that no other files are damaged. Otherwise your best shot is restoring from a backup. > 4. Is it ok to execute "pg_resetwal" to recover from this situation? Does it pose any data loss ? pg_resetwal will make the situation worse. The server will start but in a totally inconsistent state. This should be your last choice, and understand that it will irremediably corrupt your system even more. At that point you should probably consider hiring some company with postgres expertise to: - try to recover some data if possible (it depends on what was the problem, what other wals you have and the state of the rest of the files) - understand what happened - fix the root problem - help you setup monitoring, alerting, archiving, backup, HA and other things you might need