Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a1Lnb-0003TV-De for pgsql-sql@arkaria.postgresql.org; Tue, 24 Nov 2015 22:10:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a1Lna-0004N9-OY for pgsql-sql@arkaria.postgresql.org; Tue, 24 Nov 2015 22:10:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a1LnY-0004L9-LT for pgsql-sql@postgresql.org; Tue, 24 Nov 2015 22:10:52 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1a1LnQ-0007an-4O for pgsql-sql@postgresql.org; Tue, 24 Nov 2015 22:10:52 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.104.53.52]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 57635401123; Tue, 24 Nov 2015 14:10:37 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 4CBBD10C1; Tue, 24 Nov 2015 19:10:35 -0300 (CLT) Date: Tue, 24 Nov 2015 19:10:35 -0300 From: Alvaro Herrera To: Tom Lane Cc: Sribeiro , pgsql-sql@postgresql.org Subject: Re: Re: ERROR while creating new user - could not open relation mapping file global/pg_filenode.map Message-ID: <20151124221035.GJ4073@alvherre.pgsql> References: <1448307482990-5874842.post@n5.nabble.com> <565378B4.5080801@aklaver.com> <1448311158958-5874860.post@n5.nabble.com> <1448386072130-5874934.post@n5.nabble.com> <32161.1448402563@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <32161.1448402563@sss.pgh.pa.us> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Tom Lane wrote: > Sribeiro writes: > > Anyone has any idea what i need to do fix this issue? > > You don't have an up-to-date backup, eh? > > You might be able to fix this by doing a fresh initdb (targeting some > other location for the data directory, of course, but being careful > to use the exact same Postgres version) and then copying the > global/pg_filenode.map file out of that data directory and into your > broken one. This would only work if you've never done a VACUUM FULL on > any of the shared catalogs in the existing data directory, so it's far > from guaranteed to work; but it's worth a try. It's relatively easy to identify the files corresponding to each catalog, even when they have been mapped; just pg_filedump the files until you find ones that match the expected number of attributes, and disambiguate based on which attributes have HEAP_VARWIDTH and such. Then you just need to cp the right files to the default names using the default map created in the freshly initdb'd cluster. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql