Re: Unable to startup postgres: Could not read from file"pg_clog/00EC" - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Unable to startup postgres: Could not read from file"pg_clog/00EC"
Date
Msg-id 20200205115116.GA7298@alvherre.pgsql
Whole thread Raw
In response to Unable to startup postgres: Could not read from file "pg_clog/00EC"  ("Nick Renders" <postgres@arcict.com>)
Responses Re: Unable to startup postgres: Could not read from file"pg_clog/00EC"
List pgsql-general
On 2020-Feb-05, Nick Renders wrote:

> Is there anything specific I should check in our postgres installation /
> database to make sure it is running ok now? Anyway to see what the
> consequences were of purging that one pg_clog file?

Losing pg_clog files is pretty bad, and should not happen; then again,
this might have been something else (ie. the file was maybe not lost).
That said, wrongly overwriting files is even worse.

By zeroing an existing pg_clog file, you marked a bunch of transactions
as aborted.  Your data is now probably inconsistent, if not downright
corrupt.  I would be looking for my most recent backup ...

If you're very lucky, your database might be pg_dumpable.  I would try
that, followed by restoring it in a separate clean instance and seeing
what happens.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-general by date:

Previous
From: Moreno Andreo
Date:
Subject: Re: Should I reinstall over current installation?
Next
From: Yasin Sari
Date:
Subject: Re: Declare variable from other variable