Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UB11y-0004UH-5v for pgsql-admin@arkaria.postgresql.org; Thu, 28 Feb 2013 10:48:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UB11x-0006Zx-LE for pgsql-admin@arkaria.postgresql.org; Thu, 28 Feb 2013 10:48:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UB11w-0006YR-Hb for pgsql-admin@postgresql.org; Thu, 28 Feb 2013 10:48:04 +0000 Received: from [89.36.21.141] (helo=server.scorpionsoftware.ro) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UB11u-00079B-Oe for pgsql-admin@postgresql.org; Thu, 28 Feb 2013 10:48:04 +0000 Received: from dyn-86.106.49.99.cj.upcnet.ro ([86.106.49.99]:60518 helo=[192.168.0.103]) by server.scorpionsoftware.ro with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80) (envelope-from ) id 1UB0zr-0002xk-5m for pgsql-admin@postgresql.org; Thu, 28 Feb 2013 12:45:55 +0200 Message-ID: <512F3562.9060609@scorpionsoftware.ro> Date: Thu, 28 Feb 2013 12:45:54 +0200 From: Daniel Paval User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Data corruption / recover Content-Type: multipart/alternative; boundary="------------000703020001050103000606" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.scorpionsoftware.ro X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - scorpionsoftware.ro X-Get-Message-Sender-Via: server.scorpionsoftware.ro: authenticated_id: dani+scorpionsoftware.ro/only user confirmed/virtual account not confirmed X-Host-Lookup-Failed: Reverse DNS lookup failed for 89.36.21.141 (failed) X-Pg-Spam-Score: 1.6 (+) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org This is a multi-part message in MIME format. --------------000703020001050103000606 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, We're dealing with the following situation (PG version is 7.4.30): somehow, a DB has gone missing from pg_database (psql \l listing doesn't show it anymore). More, while you can still \c to it, a \d table listing only shows a fraction of the tables. A \d on the existing tables shows missing columns as well.. However, all the tables (still visible or not) may be queried by selects via psql and the actual data and columns in the result sets seem just fine. We backed up the data folder and for the last 24h tried to recover the situation to a point where pg_dump works. Unfortunately we haven't been fully successful yet although we tried tons of suggestions in previous similar posts. Reindex didn't help, but a "VACUUM *FULL* FREEZE [ANALYZE]" did free 70% (14GB to 4) of the used disk space. Of course, the database wasn't vacuumed regularly as it should have been so: /WARNING: some databases have not been vacuumed in over 2 billion transactions// //DETAIL: You may have already suffered transaction-wraparound data loss.// / A full vacuum _without_ the freeze option does make all databases, tables and users visible, but duplicated, i.e. \l then shows the database twice and a \d on the database lists all tables twice. The postgres user appears twice in pg_user, etc. pg_dump won't work if the database is not listed and won't either if the postgres user is duplicated.. Does this sound familiar to anyone? It's a pity that all the data seems to be there, but we're not able to recover and restore it to a clean DB. We'd appreciate any suggestions. Thank you! --------------000703020001050103000606 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi,

We're dealing with the following situation (PG version is 7.4.30): somehow, a DB has gone missing from pg_database (psql \l listing doesn't show it anymore). More, while you can still \c to it, a \d table listing only shows a fraction of the tables. A \d on the existing tables shows missing columns as well.. However, all the tables (still visible or not) may be queried by selects via psql and the actual data and columns in the result sets seem just fine.

We backed up the data folder and for the last 24h tried to recover the situation to a point where pg_dump works. Unfortunately we haven't been fully successful yet although we tried tons of suggestions in previous similar posts. Reindex didn't help, but a "VACUUM FULL FREEZE [ANALYZE]" did free 70% (14GB to 4) of the used disk space. Of course, the database wasn't vacuumed regularly as it should have been so:

WARNING:  some databases have not been vacuumed in over 2 billion transactions
DETAIL:  You may have already suffered transaction-wraparound data loss.

A full vacuum without the freeze option does make all databases, tables and users visible, but duplicated, i.e. \l then shows the database twice and a \d on the database lists all tables twice. The postgres user appears twice in pg_user, etc. pg_dump won't work if the database is not listed and won't either if the postgres user is duplicated..

Does this sound familiar to anyone? It's a pity that all the data seems to be there, but we're not able to recover and restore it to a clean DB. We'd appreciate any suggestions.

Thank you!
--------------000703020001050103000606--