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 1ftxKN-0005Xk-IY for pgsql-admin@arkaria.postgresql.org; Sun, 26 Aug 2018 15:51:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ftxKL-0001tF-1g for pgsql-admin@arkaria.postgresql.org; Sun, 26 Aug 2018 15:51:45 +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 1ftxKK-0001t8-Qz for pgsql-admin@lists.postgresql.org; Sun, 26 Aug 2018 15:51:44 +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 1ftxKC-0006SB-I5 for pgsql-admin@lists.postgresql.org; Sun, 26 Aug 2018 15:51:44 +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 w7QFpVVj020971; Sun, 26 Aug 2018 11:51:31 -0400 From: Tom Lane To: Mariel Cherkassky cc: pgsql-admin@lists.postgresql.org Subject: Re: Could not open file "pg_subtrans/01EB" In-reply-to: References: Comments: In-reply-to Mariel Cherkassky message dated "Sun, 26 Aug 2018 12:29:32 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20969.1535298691.1@sss.pgh.pa.us> Date: Sun, 26 Aug 2018 11:51:31 -0400 Message-ID: <20970.1535298691@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Mariel Cherkassky writes: > I'm trying to investigate a database of one of our clients. The database > version is 9.2.5. 1. Fire their DBA for dereliction of duty. 2. Update to the last available release of 9.2.x (9.2.24, looks like). 3. Vacuum everything and see if it gets better. Vacuuming may or may not fix the observed data corruption problems, but it's silly to ignore the fact that they're missing four years worth of bug fixes in that branch. In particular I'm noticing the first entry in the change notes for 9.2.6, which recommends "vacuuming all tables in all databases while having vacuum_freeze_table_age set to zero": https://www.postgresql.org/docs/9.2/static/release-9-2-6.html That problem as-described seems to involve rows disappearing, rather than getting duplicated, but I wouldn't rule out that it could also have symptoms like this. If that doesn't fix things, you could then try: 4. Manually eliminate duplicate rows by identifying which one of each pair seems older and deleting it with DELETE ... WHERE ctid = '(x,y)'. Then reindex to confirm no duplicates remain. But you still need step 2, to reduce the odds the problem will recur. regards, tom lane