pgsql: Ensure we have a snapshot when updating pg_index in index_drop()

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема pgsql: Ensure we have a snapshot when updating pg_index in index_drop()
Дата
Msg-id E1t5XYO-002uBV-JN@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Ensure we have a snapshot when updating pg_index in index_drop().

I assumed that all index_drop() callers set an active snapshot
beforehand, but that is evidently not true.  One counterexample is
autovacuum, which doesn't set an active snapshot when cleaning up
orphan temp indexes.  To fix, unconditionally push an active
snapshot before updating pg_index in index_drop().

Oversight in commit b52adbad46.

Reported-by: Masahiko Sawada
Reviewed-by: Stepan Neretin, Masahiko Sawada
Discussion: https://postgr.es/m/CAD21AoBgF9etQrXbN9or_YHsmBRJHHNUEkhHp9rGK9CyQv5aTQ%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/70b9adb98eab42bc12ddeea863be335b21b55675

Modified Files
--------------
src/backend/catalog/index.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)


В списке pgsql-committers по дате отправления: