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 1gBzs6-00017Y-5B for pgsql-general@arkaria.postgresql.org; Mon, 15 Oct 2018 10:13:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gBzs4-0002m9-Jr for pgsql-general@arkaria.postgresql.org; Mon, 15 Oct 2018 10:13:08 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBzs4-0002m2-7c for pgsql-general@lists.postgresql.org; Mon, 15 Oct 2018 10:13:08 +0000 Received: from mx1.mailbox.org ([80.241.60.212]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gBzs1-0003sY-5M for pgsql-general@lists.postgresql.org; Mon, 15 Oct 2018 10:13:06 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 57ADD40610; Mon, 15 Oct 2018 12:13:01 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id FNIiRFWfYgjp; Mon, 15 Oct 2018 12:12:59 +0200 (CEST) Message-ID: Subject: Re: Problem creating a database From: Laurenz Albe To: Joshua White , pgsql-general@lists.postgresql.org Date: Mon, 15 Oct 2018 12:12:58 +0200 In-Reply-To: References: 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: > I'm hoping someone can point me in the right direction. I've got a PostgreSQL 10 server > instance on CentOS 6, which I set up and manage. I have full admin rights on this machine, > so I can access logs, etc. > > Recently I attempted to create a new database in this cluster. The command succeeds, > but when I try to connect to the new database, I get a "could not open file" error: > > psql: FATAL: could not open file "base/618720/2610": No such file or directory > > It has been some time since I set up the database, so I don't know how long ago this > became an issue. I can't seem to find any other instances of this problem online either. > The logs are not helpful - even on the highest debug setting, I only see the > "connection authorized" then the fatal "could not open file" error. > > The data directory is on a separate disk array to the OS. Recently checked it and > there are no disk errors. > > Any thoughts or ideas would be much appreciated. Looks like the file backing the "pg_index" table is gone. Can you check if the file exists in the data directory or not? It's hard to determine what happened, but something has been eating your data. As it is, your best option would be to drop the database and recreate it from a backup. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com