Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUwTd-0002Kj-OZ for pgsql-admin@arkaria.postgresql.org; Fri, 29 Dec 2017 15:21:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUwTa-0005Wg-Tc for pgsql-admin@arkaria.postgresql.org; Fri, 29 Dec 2017 15:21:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eUwTa-0005WW-FI for pgsql-admin@lists.postgresql.org; Fri, 29 Dec 2017 15:21:38 +0000 Received: from smtp-32-i5.italiaonline.it ([213.209.9.32] helo=libero.it) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eUwTT-0005rB-1B for pgsql-admin@lists.postgresql.org; Fri, 29 Dec 2017 15:21:37 +0000 Received: from oxapps-08-047.iol.local ([10.101.8.57]) by smtp-32.iol.local with SMTP id UwTOelWVkUOedUwTOeTxjH; Fri, 29 Dec 2017 16:21:26 +0100 x-libjamoibt: 1601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virgilio.it; s=s2017; t=1514560886; bh=WUvdVCUjqQ8tupEx5fCKjQ7HaDI6cFNKTzJvFjk8nso=; h=Date:From:To:Subject; b=gdXTddnz1UaRZ9YFi6W5mxOMcWOvOHZZ5b82M1RhuThtBJjibm6y3mRzmam8rYfK+ wMIbdIcQIiilfrIbUfhV5gZdEOLkExBpxmN6qsomqKDgl2D3G6jbbkSNP+4g63upoj OM7Cu2IUfCjBUwF0+ggThr9s+XIxVbH91jKEHX4C8kjz5vMycq5Aq0it8XPuPrhRtC pSvRQAeEn6bbrgu0yoLNx+TRVuHnc3byaTMeMVFadYleu025zoe93uZVcNvEtXfMa1 j9aUi3R3WdLmsj13g2Bv4y61hXCpy8EL1u0iogtwut9l9Qqe19UeOq2dHg6f1RZl7j xvh7W5shgVs2Q== X-CNFS-Analysis: v=2.2 cv=H56r+6Qi c=1 sm=1 tr=0 a=YjcV1L+cHlwd9dMdVBh9iA==:117 a=IPstl3nwgKMA:10 a=acpdpqt0Mm8Xlqz2FCIA:9 a=QEXdDO2ut3YA:10 a=_W_S_7VecoQA:10 Date: Fri, 29 Dec 2017 16:21:26 +0100 (CET) From: flumbador@virgilio.it To: pgsql-admin@lists.postgresql.org Message-ID: <524817289.230206.1514560886805@mail.virgilio.it> Subject: Issue on restore / recover MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_230205_54426804.1514560886802" X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.3-Rev40 X-Originating-IP: 46.235.159.121 X-Originating-Client: open-xchange-appsuite x-libjamsun: lVuq6v511R/XxnlOfoqkI0Q57PP03zo2 x-libjamv: sI7aY3t5JD8= X-CMAE-Envelope: MS4wfDsArAkXDw/WAzL2prIKntuvEHegUrz4g7ohpja0J6gVuyLn+Vb4ZkRPlOi3lsGgKSuTmZJhIo2KoITq184sSRGiOIQMSX9CFUHCUyWJ+leaW3+AOplv PtZTYkjn04euQ34ZHlxDaUZtX2ICweo8nbgTh8NC0bIXIHSmMEbK/sfudEym+0ni1am89sADE1q0ayYblezDHg+rO1/hi8XX+nE= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_230205_54426804.1514560886802 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello I've a question about postgresql restore / recover. I have restored and recovered a Postgresql 9.4.9 from an hot backup. The backup is a filesystem copy taken while the Postgrsql is in backup mode (I mean between start and stop backup). During the restore 3 files were missing; these three files belong to a table with high transaction workload, and for sure during the backup many transactions had modified this table and those missing files. What is surprising to me is that even if the files were missing the recover phase ended successfully. I expect an error (for example file not found) raised when postgresql try to apply the wal entries related to this table and those files. After the recover I find that these three file has been created during recover but when I try to query the table I get the error: db4=# select count(*) from pgbench_accounts ; ERROR: could not read block 1999996 in file "pg_tblspc/16471/PG_9.4_201409291/16474/16593.15": read only 0 of 8192 bytes This error confirm that my database is corrupted! The question is: why during the recover phase Postgresql doesn't throw any errors? I think that is better to know immediately that we have restored our database from a corrupted backup rather then discover the issue after maybe a long time when a query is executed on the corrupted table. Thanks in advance Regards Gabriele ------=_Part_230205_54426804.1514560886802 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hello

I've a question about postgresql restore / = recover.

I have restored and recovered a Postgresql 9.4.9 from an hot= backup. The backup is a filesystem copy taken while the Postgrsql is in ba= ckup mode (I mean between start and stop backup).

During the restore = 3 files were missing; these three files belong to a table with high transac= tion workload, and for sure during the backup many transactions had mo= dified this table and those missing files. What is surprising to me is that= even if the files were missing the recover phase ended successfully. I exp= ect an error (for example file not found) raised when postgresql try to app= ly the wal entries related to this table and those files. After the recover= I find that these three file has been created during recover but when I tr= y to query the table I get the error:

db4=3D# select count(*) from pg= bench_accounts ;

ERROR: could not read block 1999996 in file "pg_= tblspc/16471/PG_9.4_201409291/16474/16593.15": read only 0 of 8192 byte= s

This error confirm that my database is corrupted! The question is: = why during the recover phase Postgresql doesn't throw any errors? I thi= nk that is better to know immediately that we have restored our databa= se from a corrupted backup rather then discover the issue after maybe a lon= g time when a query is executed on the corrupted table.

Thanks i= n advance

Regards

Gabriele

=20 ------=_Part_230205_54426804.1514560886802--