Re: Issue on restore / recover - Mailing list pgsql-admin

From Stephen Frost
Subject Re: Issue on restore / recover
Date
Msg-id 20180102151925.GY2416@tamriel.snowman.net
Whole thread Raw
In response to Re: Issue on restore / recover  (Ben Primrose <bprimrose@tracelink.com>)
List pgsql-admin
Greetings Ben,

* Ben Primrose (bprimrose@tracelink.com) wrote:
> How was the backup taken, and what platform are you on?

Good questions, I've asked them also.

> Are these tables in unlogged mode?  Check pg_class.relpersistence to find
> out.
[...]
> > 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

PostgreSQL knows how to handle unlogged tables when doing backup/restore
(they'll get zero'd out during the restore process) and so you wouldn't
(shouldn't anyway) see an error like this even if the table is unlogged
(instead, it would just be empty).

Thanks!

Stephen

Attachment

pgsql-admin by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Issue on restore / recover
Next
From: Alvaro Herrera
Date:
Subject: Re: Issue on restore / recover