From: Tom Lane <tgl@sss.pgh.pa.us>
To: ertan.kucukoglu@1nar.com.tr
Cc: 'Rob Sargent' <robjsargent@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Errors after cloning OS to new disk under Hyper-V
Date: Sat, 18 Jul 2020 00:57:30 -0400
Message-ID: <3918730.1595048250@sss.pgh.pa.us> (raw)
In-Reply-To: <000a01d65cbd$002223a0$00666ae0$@1nar.com.tr>
References: <000901d65cae$49ca2de0$dd5e89a0$@1nar.com.tr>
<7935483b-8baa-fb7a-b6eb-58402bacb5f9@gmail.com>
<000a01d65cbd$002223a0$00666ae0$@1nar.com.tr>
<ertan.kucukoglu@1nar.com.tr> writes:
> From: Rob Sargent <robjsargent@gmail.com>
>> Have you tried to REINDEX as suggested?
> I cannot get access to psql. If there is a way to reindex without having to login first, I do not know how to do that.
The disaster recovery process that Rob is suggesting goes like this:
* Shut down server, if it's running
* Start a standalone backend with the -P (disable system indexes) switch:
postgres --single -P database_name
* REINDEX everything in sight, or at least REINDEX SYSTEM
* Quit standalone backend (control-D on Unix, less sure about Windows)
* Repeat for each database you care about
* Restart server
TBH, though, I have no expectation that this will help you. It can
work for fixing a situation with limited damage to system catalog
indexes; but it cannot fix damage to the catalog tables themselves.
Given that the damage seems to have been done by a faulty filesystem-level
copying tool, there's little reason to hope that only the indexes and
not the tables were damaged. No non-Postgres-specific tool would be
likely to know the difference, because they're all just files.
But, having said that, the error messages you quoted seem to be
complaining only about indexes. Maybe it's worth trying this.
Failing that, you could call in a professional data recovery
consultant, if the data is valuable enough for that to make sense.
But this sort of situation is not likely to be recoverable
without detailed expert help, and maybe not then. (A word of
advice: if calling in outside help is even faintly possible,
don't do *anything* without first making a filesystem-level
backup that you can trust. Otherwise your own attempts might
just break things beyond the last chance of repair.)
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, ertan.kucukoglu@1nar.com.tr, robjsargent@gmail.com
Subject: Re: Errors after cloning OS to new disk under Hyper-V
In-Reply-To: <3918730.1595048250@sss.pgh.pa.us>
References: <000901d65cae$49ca2de0$dd5e89a0$@1nar.com.tr> <7935483b-8baa-fb7a-b6eb-58402bacb5f9@gmail.com> <000a01d65cbd$002223a0$00666ae0$@1nar.com.tr> <3918730.1595048250@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox