Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id B8AFDB5DD84 for ; Mon, 29 Aug 2011 19:24:29 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 65975-08 for ; Mon, 29 Aug 2011 22:24:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from b.mail.sonic.net (b.mail.sonic.net [64.142.19.5]) by mail.postgresql.org (Postfix) with ESMTP id 5BB94B5DD4A for ; Mon, 29 Aug 2011 19:24:08 -0300 (ADT) Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19]) by b.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id p7TMNVp6001548 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 29 Aug 2011 15:23:32 -0700 Received: from bolt.sonic.net (IDENT:q9ktpF+LoYVNWZqsiqV7nbGYImsuMPu/@localhost.localdomain [127.0.0.1]) by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id p7TMNVT3015778; Mon, 29 Aug 2011 15:23:31 -0700 Received: (from daveg@localhost) by bolt.sonic.net (8.13.6/8.12.1/Submit) id p7TMNVWv015777; Mon, 29 Aug 2011 15:23:31 -0700 Date: Mon, 29 Aug 2011 15:23:31 -0700 From: daveg To: hubert depesz lubaczewski Cc: Bruce Momjian , PostgreSQL-development Subject: Re: [GENERAL] pg_upgrade problem Message-ID: <20110829222331.GB10597@sonic.net> References: <20110825205318.GA25225@depesz.com> <201108260418.p7Q4Itk17514@momjian.us> <20110826152834.GA7886@depesz.com> <20110829165441.GA28573@depesz.com> <20110829174924.GA14101@depesz.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110829174924.GA14101@depesz.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201108/1313 X-Sequence-Number: 194068 On Mon, Aug 29, 2011 at 07:49:24PM +0200, hubert depesz lubaczewski wrote: > On Mon, Aug 29, 2011 at 06:54:41PM +0200, hubert depesz lubaczewski wrote: > vacuumdb: vacuuming of database "etsy_v2" failed: ERROR: could not access status of transaction 3429738606 > DETAIL: Could not open file "pg_clog/0CC6": No such file or directory. > > Interestingly. > > In old dir there is pg_clog directory with files: > 0AC0 .. 0DAF (including 0CC6, size 262144) > but new pg_clog has only: > 0D2F .. 0DB0 > > File content - nearly all files that exist in both places are the same, with exception of 2 newest ones in new datadir: > 3c5122f3e80851735c19522065a2d12a 0DAF > 8651fc2b9fa3d27cfb5b496165cead68 0DB0 > > 0DB0 doesn't exist in old, and 0DAF has different md5sum: 7d48996c762d6a10f8eda88ae766c5dd > > one more thing. I did select count(*) from transactions and it worked. > > that's about it. I can probably copy over files from old datadir to new (in > pg_clog/), and will be happy to do it, but I'll wait for your call - retry with > copies files might destroy some evidence. I had this same thing happen this Saturday just past and my client had to restore the whole 2+ TB instance from the previous days pg_dumps. I had been thinking that perhaps I did something wrong in setting up or running the upgrade, but had not found it yet. Now that I see Hubert has the same problem it is starting to look like pg_upgrade can eat all your data. After running pg_upgrade apparently successfully and analyzeing all the tables we restarted the production workload and started getting errors: 2011-08-27 04:18:34.015 12337 c06 postgres ERROR: could not access status of transaction 2923961093 2011-08-27 04:18:34.015 12337 c06 postgres DETAIL: Could not open file "pg_clog/0AE4": No such file or directory. 2011-08-27 04:18:34.015 12337 c06 postgres STATEMENT: analyze public.b_pxx; On examination the pg_clog directory contained on two files timestamped after the startup of the new cluster with 9.0.4. Other hosts that upgraded successfully had numerous files in pg_clog dating back a few days. So it appears that all the clog files went missing during the upgrade somehow. a This happened upgrading from 8.4.7 to 9.0.4, with a brief session in between at 8.4.8. We have upgraded several hosts to 9.0.4 successfully previously. -dg -- David Gould daveg@sonic.net 510 536 1443 510 282 0869 If simplicity worked, the world would be overrun with insects.