Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UB4MM-00073Q-2B for pgsql-admin@arkaria.postgresql.org; Thu, 28 Feb 2013 14:21:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UB4ML-0003v9-8S for pgsql-admin@arkaria.postgresql.org; Thu, 28 Feb 2013 14:21:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UB4MJ-0003v1-Ar for pgsql-admin@postgresql.org; Thu, 28 Feb 2013 14:21:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UB4MH-000240-A7 for pgsql-admin@postgresql.org; Thu, 28 Feb 2013 14:21:19 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r1SELGgv004303; Thu, 28 Feb 2013 09:21:16 -0500 (EST) From: Tom Lane To: Daniel Paval cc: pgsql-admin@postgresql.org Subject: Re: Data corruption / recover In-reply-to: <512F3562.9060609@scorpionsoftware.ro> References: <512F3562.9060609@scorpionsoftware.ro> Comments: In-reply-to Daniel Paval message dated "Thu, 28 Feb 2013 12:45:54 +0200" Date: Thu, 28 Feb 2013 09:21:15 -0500 Message-ID: <4302.1362061275@sss.pgh.pa.us> X-Pg-Spam-Score: -2.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 Daniel Paval writes: > We're dealing with the following situation (PG version is 7.4.30): 7.4? I sure hope you're going to migrate onto something less obsolete once you get out of this problem. In any still-in-support release series, autovacuum would have saved you from this. > 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. Transaction IDs in the system catalogs have wrapped around, so that some rows appear to be "in the future" and thus invisible. > 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. Not too surprising. You'll need to examine each pair of duplicate catalog rows, figure out which version is newer, and then delete the older version. (Use the ctid column to disambiguate.) More than likely, there are some duplicates in your data as well as in the system catalogs, so I'm afraid you've got quite a bit of manual repair in front of you. regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin