pgsql: During heap rebuild, lock any TOAST index until end of transacti

Поиск
Список
Период
Сортировка
От Noah Misch
Тема pgsql: During heap rebuild, lock any TOAST index until end of transacti
Дата
Msg-id E1jFhG1-0000VE-G8@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
During heap rebuild, lock any TOAST index until end of transaction.

swap_relation_files() calls toast_get_valid_index() to find and lock
this index, just before swapping with the rebuilt TOAST index.  The
latter function releases the lock before returning.  Potential for
mischief is low; a concurrent session can issue ALTER INDEX ... SET
(fillfactor = ...), which is not alarming.  Nonetheless, changing
pg_class.relfilenode without a lock is unconventional.  Back-patch to
9.5 (all supported versions), because another fix needs this.

Discussion: https://postgr.es/m/20191226001521.GA1772687@rfd.leadboat.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/78a34c68920a544292d54f60af561c267b95f64d

Modified Files
--------------
src/backend/access/heap/tuptoaster.c | 4 ++--
src/backend/commands/cluster.c       | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)


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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: pgsql: Allow page lock to conflict among parallel group members.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Skip WAL for new relfilenodes, under wal_level=minimal.