Re: PostgreSQL 9.6.1 - Windows 64bit - HDD crash due to power outage - Mailing list pgsql-admin

From David G. Johnston
Subject Re: PostgreSQL 9.6.1 - Windows 64bit - HDD crash due to power outage
Date
Msg-id CAKFQuwbGADv07Nfuhow7XpNmfSTPfu-TtP5sZ6J_uSRLEC6VDQ@mail.gmail.com
Whole thread Raw
In response to PostgreSQL 9.6.1 - Windows 64bit - HDD crash due to power outage  (Ertan Küçükoğlu <ertan.kucukoglu@1nar.com.tr>)
Responses Re: PostgreSQL 9.6.1 - Windows 64bit - HDD crash due to power outage  (Ertan Küçükoğlu <ertan.kucukoglu@1nar.com.tr>)
List pgsql-admin
On Monday, April 3, 2017, Ertan Küçükoğlu <ertan.kucukoglu@1nar.com.tr> wrote:
- If I setup a new PostgreSQL server using identical binaries as the crashed
one, and copy rescued data directory onto that new server data directory,
overwriting new system data directory when server is down. Will that work
assuming recovered data is structurally fine?

If you can copy over the last versions of the WAL and data files (including non-default tablespaces) (and ideally configuration files) and point the same binaries to those it will work in theory.
 
 If that method works, how can
I test that database files are fine and there is no problem with them?

Performing a full pg_dump on the database/cluster is the only routine I can think of - but my experience here is limited.

David J.

pgsql-admin by date:

Previous
From: Samed YILDIRIM
Date:
Subject: Re: PostgreSQL 9.6.1 - Windows 64bit - HDD crash due to power outage
Next
From: ghiureai
Date:
Subject: pgsql and lxc containers input