Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kBOgL-0002Ek-Sf for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Aug 2020 20:39:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kBOgJ-0003fX-Dv for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Aug 2020 20:39:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kBOgJ-0003eh-7t for pgsql-bugs@lists.postgresql.org; Thu, 27 Aug 2020 20:39:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kBOgC-00026n-4J for pgsql-bugs@lists.postgresql.org; Thu, 27 Aug 2020 20:39:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 07RKdNBe3355931; Thu, 27 Aug 2020 16:39:23 -0400 From: Tom Lane To: Jesse Kinkead cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16595: Reads fail with "lost saved point in index" error after writes In-reply-to: References: <16595-633118be8eef9ce2@postgresql.org> <3032572.1598540464@sss.pgh.pa.us> Comments: In-reply-to Jesse Kinkead message dated "Thu, 27 Aug 2020 13:19:45 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3355929.1598560763.1@sss.pgh.pa.us> Date: Thu, 27 Aug 2020 16:39:23 -0400 Message-ID: <3355930.1598560763@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Jesse Kinkead writes: > It sounds like this isn't a known problem, Well, now it is :-). I'm just finishing up testing a patch. > and that the only workaround > might be just dropping the index. Hmm! Single-column GIN indexes aren't subject to the issue, so maybe you could work around it by replacing the multicolumn index with some single-column ones? Also, now that I've studied the code some more, the code path with the issue is only hit for queries that use (a) partial match or (b) an empty query that forces a full-index scan, similar to "arraycol @> '{}'". That might explain how come the bug went undetected for so long. I dunno if that info will help you dodge the bug, but maybe. If you can't find any acceptable workaround, another idea is to build your own server version with the patch applied, to tide you over until there's an official release with the fix. IMO one of the main benefits of using open-source code is that that's normally not very difficult. regards, tom lane