Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gCfBJ-0006TN-Gw for pgsql-general@arkaria.postgresql.org; Wed, 17 Oct 2018 06:19:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gCfBH-0005HY-9T for pgsql-general@arkaria.postgresql.org; Wed, 17 Oct 2018 06:19:43 +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.89) (envelope-from ) id 1gCfBF-00051T-BT for pgsql-general@lists.postgresql.org; Wed, 17 Oct 2018 06:19:41 +0000 Received: from mx1.mailbox.org ([80.241.60.212]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gCfBB-0006fF-F4 for pgsql-general@lists.postgresql.org; Wed, 17 Oct 2018 06:19:40 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 2E6BB42DA5; Wed, 17 Oct 2018 08:19:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id KysdCOb5YxzG; Wed, 17 Oct 2018 08:19:33 +0200 (CEST) Message-ID: <67e0670089d73d995759725ef42b59cd85ff0d84.camel@cybertec.at> Subject: Re: Problem creating a database From: Laurenz Albe To: Joshua White Cc: pgsql-general@lists.postgresql.org Date: Wed, 17 Oct 2018 08:19:32 +0200 In-Reply-To: References: <6f6b9febf25df823552b0d80c5eff9eeccf628d4.camel@cybertec.at> Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Joshua White wrote: > > > > > > psql: FATAL: could not open file "base/618720/2610": No such file or directory > > > > > > "pg_index" initially uses file 2610. > > > > > > Anyway, your database seems to be quite wrecked, and you'd probably need > > > an expert to save what can be saved. > > > So you're right about it being seriously corrupted somehow. All my custom databases seem to work fine. > I have data checksums and amcheck enabled and haven't found any issues using the query below. > > SELECT bt_index_check(index => c.oid), c.relname, c.relpages > FROM pg_index i > JOIN pg_opclass op ON i.indclass[0] = op.oid > JOIN pg_am am ON op.opcmethod = am.oid > JOIN pg_class c ON i.indexrelid = c.oid > JOIN pg_namespace n ON c.relnamespace = n.oid > WHERE am.amname = 'btree' > -- Don't check temp tables, which may be from another session: > AND c.relpersistence != 't' > AND i.indisready AND i.indisvalid > ORDER BY c.relpages DESC; > > However, when I went to connect to template1, it failed: > > # \connect template1 > FATAL: could not open file "base/1/2610": No such file or directory > Previous connection kept > > If template1 is corrupt, that would explain why I am unable to create new databases. Right. I think that dumping what you can and importing it in a new cluster is the way to go. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com