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 1mAuxL-0005it-KV for pgsql-general@arkaria.postgresql.org; Tue, 03 Aug 2021 13:59:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mAuxJ-00042E-PO for pgsql-general@arkaria.postgresql.org; Tue, 03 Aug 2021 13:59:41 +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 1mAuxJ-000424-G9 for pgsql-general@lists.postgresql.org; Tue, 03 Aug 2021 13:59:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mAuxG-0003ZN-Ls for pgsql-general@lists.postgresql.org; Tue, 03 Aug 2021 13:59:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 173DxXeA1703672; Tue, 3 Aug 2021 09:59:33 -0400 From: Tom Lane To: Vijaykumar Jain cc: Gilar Ginanjar , Adrian Klaver , pgsql-general Subject: Re: Unexpected block ID found when reading data In-reply-to: References: <0E5BA871-06D7-413B-930E-4A523FF1847C@innovation-project.com> <08fc89dd-c974-880d-26ca-c1a6c7ab1d1d@aklaver.com> Comments: In-reply-to Vijaykumar Jain message dated "Tue, 03 Aug 2021 18:45:44 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1703670.1627999173.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 03 Aug 2021 09:59:33 -0400 Message-ID: <1703671.1627999173@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Vijaykumar Jain writes: > On Tue, 3 Aug 2021 at 08:19, Gilar Ginanjar > wrote: >> I'm not sure which pg_dump version did i use before, but I used psql 12.5 >> to dump and the db version is postgresql 9.6. >> >> pgrestore command: >> pg_restore -U myuser -j8 -d mydb dbdump.backup >> >> I’ve tried to restore to postgre 9.6, 12.1 and 12.5 > 9.6 has had a lot of minor fixes all the way to 9.6.22 , I am speculating, > maybe your restoration to the latest minor version is failing. This error is internal to pg_restore, so the target server version isn't going to make any difference. Either the dump file is corrupt, or more likely you're dealing with a pg_restore bug or version discrepancy. (pg_restore *should* complain if the archive file is too new, but there were some bugs in that code until recently :-(.) Anyway, people have asked for the pg_restore version several times, and I hope this explains why it's critical information. *PLEASE* show us the output of "pg_restore --version". It would also be useful to see the first dozen or two lines of output from "pg_restore -l -v dbdump.backup", which should include the dump file's version as well as the source pg_dump's version. regards, tom lane