Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j98rw-0006lS-ML for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Mar 2020 14:50:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j98rv-0004Gr-7N for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Mar 2020 14:49:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j98ru-00049j-Nl for pgsql-hackers@lists.postgresql.org; Tue, 03 Mar 2020 14:49:58 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j98rn-0000fG-08 for pgsql-hackers@postgresql.org; Tue, 03 Mar 2020 14:49:57 +0000 Received: by mail-pg1-x541.google.com with SMTP id a14so1624778pgb.11 for ; Tue, 03 Mar 2020 06:49:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=i66g5250seRbD7XrvYDrxAvM/hUEDrrIVcoSShi3YMY=; b=ax/LO4ym8uqg4ITOh1RmoRV2kLbt9/lh1ewEWi1446b8o9T7IP1Vb8l2vjB/qUp0iB QAd9jupnfVeEHgyegqqVPxYMsmkByl19SpZ/lBDY/phyJcGbtATpx8XITyUDqy8Eyl4N 0hmeyN7wDIJWrJUP4pdgZ+88eIskublC0pTAVHkVhKJxtuVdYTb/CWf8105F2zKmsuqs CtYXvrLZTMzfiwSV6MR9Oxd/CSNOnisXeR/TX02S4Hq5YtTQ9F7bx0aLRIVrQWrzMige o20b/U+tpLfZ4FM4LQOFim2HBhpsepZIKM0CTPSuu5/SJT2iD5UWJHwGPNXD0dTYJ7o2 KxDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=i66g5250seRbD7XrvYDrxAvM/hUEDrrIVcoSShi3YMY=; b=P90zTPP+EzGOV58r+8ugSW4cYO0hVgNnvSkk5QtsW9C4mXT1exLQK3Kr2hSaz7+X9u lcw7vbLb012FKuYiRfrLVpRhrk6P24Fj9idFysKKz4tbvI+1UUZBNiugIjPCI9Up+d1b Hrn4FCexlsXlBRSxomZug5bq5cuK/YUJX1glFy0HyISbwP+zRZ9viSGXgYP6DpsESU7Z r/vFfbbXcJLYIZTvsfHDbXwICadIbwK9ydMcLJc1cxwqB2Kf+LlUk2QgRzg+yh6Vkmtb sPor8ZSYyFmTjkEjRQPwbrYcTofo+BgiYwLFY+VoUV3PHi4YCvPRxyXuZS1ZEAvz2nu3 jqpA== X-Gm-Message-State: ANhLgQ1fSAYTH47PIcgrP9yfyUkKps3jYuessAOABXJxt5rhWJLbWD1V fM513DDIMhvC1LuzvXKeH36/CCTWDEWplHjSdsJGx8SWllk0QNCSiATmOO9uKkTHlDwQkNSCwzA XTVREr0uax7cqn/zmRpnVZDn5x1A+5ZkmUE33YxIihdlJrsM+GHX6235DDr31xmXsoEveD+LHTy oouQ7h6iU1T15t0G3075J0b3ya+ze9Gw== X-Google-Smtp-Source: ADFU+vud8zpXPj23LV+qwO1osomaKEsLXxKRd9GzA7cxx1WF8npWOS5pHkeFnR8Rl3boJNp/Ocm1tg== X-Received: by 2002:a63:4453:: with SMTP id t19mr4247397pgk.381.1583246989560; Tue, 03 Mar 2020 06:49:49 -0800 (PST) Received: from localhost.localdomain ([114.143.109.178]) by smtp.gmail.com with ESMTPSA id mp5sm2787653pjb.48.2020.03.03.06.49.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Mar 2020 06:49:48 -0800 (PST) Subject: Re: backup manifests From: tushar To: Robert Haas , Suraj Kharage Cc: Rushabh Lathia , Tels , David Steele , Andrew Dunstan , PostgreSQL Hackers , Jeevan Chalke , vignesh C References: Message-ID: <8d81bcd9-fa06-a8a2-10e2-8368580e8e4f@enterprisedb.com> Date: Tue, 3 Mar 2020 20:19:42 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CLOUD-SEC-AV-Info: edb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/3/20 4:04 PM, tushar wrote: > Thanks Robert.  After applying all the 5 patches (v8-00*) against PG > v13 (commit id -afb5465e0cfce7637066eaaaeecab30b0f23fbe3) , There is a scenario where pg_validatebackup is not throwing an error if some file deleted from pg_wal/ folder and  but later at the time of restoring - we are getting an error [centos@tushar-ldap-docker bin]$ ./pg_basebackup  -D test1 [centos@tushar-ldap-docker bin]$ ls test1/pg_wal/ 000000010000000000000010  archive_status [centos@tushar-ldap-docker bin]$ rm -rf test1/pg_wal/* [centos@tushar-ldap-docker bin]$ ./pg_validatebackup test1 pg_validatebackup: * manifest_checksum = 88f1ed995c83e86252466a2c88b3e660a69cfc76c169991134b101c4f16c9df7 pg_validatebackup: backup successfully verified [centos@tushar-ldap-docker bin]$ ./pg_ctl -D test1 start -o '-p 3333' waiting for server to start....2020-03-02 20:05:22.732 IST [21441] LOG:  starting PostgreSQL 13devel on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit 2020-03-02 20:05:22.733 IST [21441] LOG:  listening on IPv6 address "::1", port 3333 2020-03-02 20:05:22.733 IST [21441] LOG:  listening on IPv4 address "127.0.0.1", port 3333 2020-03-02 20:05:22.736 IST [21441] LOG:  listening on Unix socket "/tmp/.s.PGSQL.3333" 2020-03-02 20:05:22.739 IST [21442] LOG:  database system was interrupted; last known up at 2020-03-02 20:04:35 IST 2020-03-02 20:05:22.739 IST [21442] LOG:  creating missing WAL directory "pg_wal/archive_status" 2020-03-02 20:05:22.886 IST [21442] LOG:  invalid checkpoint record 2020-03-02 20:05:22.886 IST [21442] FATAL:  could not locate required checkpoint record 2020-03-02 20:05:22.886 IST [21442] HINT:  If you are restoring from a backup, touch "/home/centos/pg13_bk_mani/edb/edbpsql/bin/test1/recovery.signal" and add required recovery options.     If you are not restoring from a backup, try removing the file "/home/centos/pg13_bk_mani/edb/edbpsql/bin/test1/backup_label".     Be careful: removing "/home/centos/pg13_bk_mani/edb/edbpsql/bin/test1/backup_label" will result in a corrupt cluster if restoring from a backup. 2020-03-02 20:05:22.886 IST [21441] LOG:  startup process (PID 21442) exited with exit code 1 2020-03-02 20:05:22.886 IST [21441] LOG:  aborting startup due to startup process failure 2020-03-02 20:05:22.889 IST [21441] LOG:  database system is shut down  stopped waiting pg_ctl: could not start server Examine the log output. [centos@tushar-ldap-docker bin]$ -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The Enterprise PostgreSQL Company