Re: BUG #17268: Possible corruption in toast index after reindex index concurrently
Alexey Ermakov <alexey.ermakov@dataegret.com>
From: Alexey Ermakov <alexey.ermakov@dataegret.com>
To: Maxim Boguk <maxim.boguk@gmail.com>, Andres Freund <andres@anarazel.de>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>,
Peter Geoghegan <pg@bowt.ie>, Michael Paquier <michael@paquier.xyz>
Date: 2021-11-08T11:04:40Z
Lists: pgsql-bugs
Hello, On 2021-11-08 02:29, Maxim Boguk wrote: > On Sun, Nov 7, 2021 at 2:07 AM Andres Freund <andres@anarazel.de> wrote: >> Hi, >> >> On November 4, 2021 1:01:44 PM PDT, Maxim Boguk <maxim.boguk@gmail.com> wrote: >>> UPDATE: the problem base table entry which had erroneous toast data >>> definitely had been created during the REINDEX run of toast idx. >> Do you have any details about the transaction / application that inserted the data? > Well... jdbc with server side prepared statements off (pgbouncer). > I was told that application inserts rows into given table with queries like: INSERT INTO zz (id, body) VALUES (?, ?) ON CONFLICT (id) DO NOTHING inside transaction. It's possible to attempt to insert row with same id several times inside one transaction (in that case usually that id is new one i.e. was not presented in the table before that transaction). Hope it could help in some way. -- Thanks, Alexey Ermakov
Commits
-
Fix corruption of toast indexes with REINDEX CONCURRENTLY
- 5ed74d874f49 12.10 landed
- 9acea52ea3d4 13.6 landed
- 64ab21f0e5de 14.2 landed
- f99870dd8673 15.0 landed