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 1fbMau-0007Qu-1a for pgsql-general@arkaria.postgresql.org; Fri, 06 Jul 2018 09:00:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fbMao-0007I4-Ja for pgsql-general@arkaria.postgresql.org; Fri, 06 Jul 2018 08:59:54 +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 1fbMao-0007Hx-8E for pgsql-general@lists.postgresql.org; Fri, 06 Jul 2018 08:59:54 +0000 Received: from mail.bertschi.com ([194.147.70.69]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fbMak-0006ID-Dy for pgsql-general@postgresql.org; Fri, 06 Jul 2018 08:59:52 +0000 Received: from mail.bertschi.com ([172.20.32.161]) by mail.bertschi.com with ESMTP id w668xk7l024829-w668xk7n024829 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=CAFAIL); Fri, 6 Jul 2018 10:59:46 +0200 Received: from dueexs11.bertschi.domain (172.20.32.163) by dueexs11.bertschi.domain (172.20.32.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Fri, 6 Jul 2018 10:59:46 +0200 Received: from dueexs11.bertschi.domain ([fe80::e4c2:7a17:4a03:74f5]) by dueexs11.bertschi.domain ([fe80::e4c2:7a17:4a03:74f5%14]) with mapi id 15.01.1261.035; Fri, 6 Jul 2018 10:59:46 +0200 From: Boblitz John To: Tom Lane CC: "pgsql-general@postgresql.org" Subject: RE: Unable to Connect to DB Instance (SOLVED) Thread-Topic: Unable to Connect to DB Instance (SOLVED) Thread-Index: AdQVB0dosHp0WqFvQ9WZ5rb+1QwPqg== Date: Fri, 6 Jul 2018 08:59:46 +0000 Message-ID: Accept-Language: en-US, de-CH Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.250.230] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Good Morning, First and foremost - thank you for the info. While we still cannot determine that cause of the missing files (I see no i= ndication of them being deleted) I was able to use a combination of touch and the "blunderbuss" to fully rec= reate the two databases. While it may not always be useful - here is what I did 1) Run psql 2) Connect to db1 3) Run REINDEX SYSTEM db1 (I'm on 9.1 so options may vary) 4) Wait -> message some file not found -=20 5) in second session touch the file (pay attention to the directory) 6) goto 3)=20 This until no error, then same procedure for REINDEX DATABASE There were files missing from base, global and pg_tblspc! Rinse and repeat for the second DB. This obviously took quite a bit of tim= e - but in the end, I got it to work. Again, this worked for me and I had a backup of the postgres instance itsel= f, so I could take the chance. Regards, John Boblitz > -----Original Message----- > From: Tom Lane [mailto:tgl@sss.pgh.pa.us] > Sent: Mittwoch, 4. Juli 2018 21:37 > To: Boblitz John > Cc: pgsql-general@postgresql.org > Subject: Re: Unable to Connect to DB Instance >=20 > Boblitz John writes: > > Thanks - I get "pg_db_role_setting" as a response. >=20 > Hm ... not its index? If the table itself is gone, it's surprising that = you can get > through session startup. >=20 > > I have already attempted to reindex system but get: >=20 > I had in mind just reindexing the specific table you're having trouble wi= th ... > but this: >=20 > > ERROR: could not open file "base/11919/11680": No such file or > > directory >=20 > shows that there's another table that also has a problem, and there may b= e > more :-(. I don't know what the odds are that you can get out of this > completely. I would NOT recommend "reindex system" as a blunderbuss > solution. You do not know how much is corrupted and there's a significan= t > chance of making things worse by tromping over the whole database using > catalogs of uncertain reliability. >=20 > Did you identify which table 11680 is? >=20 > In the case of pg_db_role_setting, a possible solution is to "touch" the > missing file so it exists; it'll be empty, which means that you'll have l= ost any > ALTER DATABASE/ROLE SET settings, but that's better than not being able t= o > dump at all. (You might then need to REINDEX pg_db_role_setting to get i= ts > indexes in sync with it being empty.) >=20 > Whether an equally drastic answer is tolerable for your other missing > table(s) depends on what they are... >=20 > regards, tom lane