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 1ftKsx-0001sh-3w for pgsql-admin@arkaria.postgresql.org; Fri, 24 Aug 2018 22:48:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ftKsv-0003sa-AM for pgsql-admin@arkaria.postgresql.org; Fri, 24 Aug 2018 22:48:53 +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 1ftKsv-0003sT-39 for pgsql-admin@lists.postgresql.org; Fri, 24 Aug 2018 22:48:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ftKsr-0003J5-Qa for pgsql-admin@lists.postgresql.org; Fri, 24 Aug 2018 22:48:52 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w7OMmkMb023737; Fri, 24 Aug 2018 18:48:46 -0400 From: Tom Lane To: Ron cc: "pgsql-admin@lists.postgresql.org" Subject: Re: pg_hba.conf is corrupt In-reply-to: <3305e821-0bbb-620f-42b1-a28225b1e84a@gmail.com> References: <3305e821-0bbb-620f-42b1-a28225b1e84a@gmail.com> Comments: In-reply-to Ron message dated "Fri, 24 Aug 2018 17:40:48 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23735.1535150926.1@sss.pgh.pa.us> Date: Fri, 24 Aug 2018 18:48:46 -0400 Message-ID: <23736.1535150926@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Ron writes: > completely overwritten by binary data. Been this way for 9 months, and we > retain backups for 6 months. > Is there any way to query postgres to regenerate this data? Nope, sorry. PG doesn't ever write that file, and it doesn't keep spare copies for you. If you haven't shut down the postmaster, it's possible that you could gdb into the postmaster (blocking connection attempts :-() and dig around in the postmaster's data structures to reconstruct the info. But that's probably impractical unless you have debug symbols for the server, and even with that it'd be pretty tedious and easy to mess up. regards, tom lane