Re: BUG #17245: Index corruption involving deduplicated entries
От
Andres Freund
Тема
Re: BUG #17245: Index corruption involving deduplicated entries
Дата
Msg-id
20211030041217.sp2le3hvtmzfghwo@alap3.anarazel.de
Ответ на
Re: BUG #17245: Index corruption involving deduplicated entries (Andres Freund)
Список
Дерево обсуждения
BUG #17245: Index corruption involving deduplicated entries PG Bug reporting form <noreply@postgresql.org>
Re: BUG #17245: Index corruption involving deduplicated entries Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: BUG #17245: Index corruption involving deduplicated entries "K. R." <iijima.yun@koumakan.jp>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries "K. R." <iijima.yun@koumakan.jp>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries "K. R." <iijima.yun@koumakan.jp>
Re: BUG #17245: Index corruption involving deduplicated entries Thomas Munro <thomas.munro@gmail.com>
Re: BUG #17245: Index corruption involving deduplicated entries "K. R." <iijima.yun@koumakan.jp>
Re: BUG #17245: Index corruption involving deduplicated entries Thomas Munro <thomas.munro@gmail.com>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Kamigishi Rei <iijima.yun@koumakan.jp>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Kamigishi Rei <iijima.yun@koumakan.jp>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries David Rowley <dgrowleyml@gmail.com>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Kamigishi Rei <iijima.yun@koumakan.jp>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Andres Freund <andres@anarazel.de>
Re: BUG #17245: Index corruption involving deduplicated entries Thomas Munro <thomas.munro@gmail.com>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Andres Freund <andres@anarazel.de>
Re: BUG #17245: Index corruption involving deduplicated entries Kamigishi Rei <iijima.yun@koumakan.jp>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Andres Freund <andres@anarazel.de>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Alexander Kukushkin <cyberdemn@gmail.com>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Alexander Kukushkin <cyberdemn@gmail.com>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Pavel Borisov <pashkin.elfe@gmail.com>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Thomas Munro <thomas.munro@gmail.com>
Re: BUG #17245: Index corruption involving deduplicated entries Thomas Munro <thomas.munro@gmail.com>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Andres Freund <andres@anarazel.de>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Re: BUG #17245: Index corruption involving deduplicated entries Peter Geoghegan <pg@bowt.ie>
Hi,
On 2021-10-29 19:37:40 -0700, Andres Freund wrote:
> Amit, this looks to be a parallel vacuum related bug, see below.
>
>
> Whew, we found the bug, I think. Or at least one that can create exactly this
> situation.
> [explanation]
> I haven't yet checked whether this is a bug introduced in 14, or whether it
> was possible to hit before as well.
It looks like a v14 issue. I can't reproduce it in 13, and I think a
change in
commit b4af70cb210393c9c8f41643acf6b213e21178e7
Author: Peter Geoghegan
Date: 2021-04-05 13:21:44 -0700
Simplify state managed by VACUUM.
which changed the logic for which relations are done in the leader:
- /* Process the indexes skipped by parallel workers */
- if (shared_indstats == NULL ||
- skip_parallel_vacuum_index(Irel[i], lps->lvshared))
- vacuum_one_index(Irel[i], &(vacrelstats->indstats[i]), lps->lvshared,
- shared_indstats, vacrelstats->dead_tuples,
- vacrelstats);
+ /* Skip already-complete indexes */
+ if (shared_istat != NULL)
+ continue;
+
+ indrel = vacrel->indrels[idx];
+
+ /*
+ * We're only here for the unsafe indexes
+ */
+ if (parallel_processing_is_safe(indrel, lvshared))
+ continue;
+
without realizing that the "shared_indstats == NULL || " piece is
important to handle parallel-safe but too-small indexes correctly.
Going a bit further than this, ISTM that once we decide to use
parallelism for any index, there's no point not using parallelism for
all the parallel-safe indexes...
Greetings,
Andres Freund
В списке pgsql-bugs по дате отправления
От: Sandeep Thakkar
Дата: