Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TULG2-00046E-IV for pgsql-bugs@postgresql.org; Fri, 02 Nov 2012 17:42:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TULFw-0003Ym-IP for pgsql-bugs@postgresql.org; Fri, 02 Nov 2012 17:42:14 +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 qA2Hg6tt000897; Fri, 2 Nov 2012 13:42:06 -0400 (EDT) From: Tom Lane To: Thomas Eckestad cc: pgsql-bugs Subject: Re: BUG #7634: Missing files in global/ after a lot of CREATE DATABASE / DROP DATABASE In-reply-to: References: <4225.1351794039@sss.pgh.pa.us> Comments: In-reply-to Thomas Eckestad message dated "Fri, 02 Nov 2012 10:58:24 +0100" Date: Fri, 02 Nov 2012 13:42:06 -0400 Message-ID: <896.1351878126@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201211/16 X-Sequence-Number: 34574 Thomas Eckestad writes: > 2012/11/1 Tom Lane >> That is extremely peculiar --- AFAICS, 9.1 should never assign a >> relfilenode of 12693. > I am afraid that I can not guarantee that the example that I posted > (global/12693) was triggered with version 9.1.6. It might be for 9.0.x or > 9.1.x, if that makes a difference. I am sure though that global/12589 was > triggered using 9.1.5 (upgraded to 9.1.6 just a few days ago). I realized that these numbers are actually quite a lot more platform-specific than I'd been thinking, since in 9.1 they will vary depending on how many OIDs got consumed for pg_collation entries, and that will depend not only on your operating system but how many locales you've seen fit to install. So I'm probably wrong to have guessed that this might represent a mistaken access to a relfilenode that never should have existed. What I'd suggest doing is monitoring the output of this query: select relname, pg_relation_filenode(oid) from pg_class where relisshared; which will tell you what filenames *ought* to be present in $PGDATA/global, and then when something goes missing it'll be possible to figure out which table or index it was. That might provide at least the first clue what's wrong. regards, tom lane