Re: PostgreSQL 9.6.1 - Windows 64bit - HDD crash due to power outage

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Ertan Küçükoğlu <ertan(dot)kucukoglu(at)1nar(dot)com(dot)tr>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: PostgreSQL 9.6.1 - Windows 64bit - HDD crash due to power outage
Date: 2017-04-03 20:21:30
Message-ID: CAKFQuwbGADv07Nfuhow7XpNmfSTPfu-TtP5sZ6J_uSRLEC6VDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Monday, April 3, 2017, Ertan Küçükoğlu <ertan(dot)kucukoglu(at)1nar(dot)com(dot)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.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message ghiureai 2017-04-04 19:52:31 pgsql and lxc containers input
Previous Message Samed YILDIRIM 2017-04-03 20:20:52 Re: PostgreSQL 9.6.1 - Windows 64bit - HDD crash due to power outage