Re: BUG #16595: Reads fail with "lost saved point in index" error after writes
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jesse Kinkead <jesse@falkon.ai>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2020-08-27T20:39:23Z
Lists: pgsql-bugs
Jesse Kinkead <jesse@falkon.ai> 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
Commits
-
Fix code for re-finding scan position in a multicolumn GIN index.
- ff3c16d1e751 12.5 landed
- fabd2f9c9443 9.5.24 landed
- 1df14a566942 13.0 landed
- 11ecf4bd2882 11.10 landed
- 10564ee02ca3 14.0 landed
- 0dfec43c829a 9.6.20 landed
- 0d3ad65404c0 10.15 landed