pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: During heap rebuild, lock any TOAST index until end of transacti 6+ messages / 1 participants [nested] [flat]
* pgsql: During heap rebuild, lock any TOAST index until end of transacti @ 2020-03-21 16:45 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 6+ messages in thread From: Noah Misch @ 2020-03-21 16:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/88b3a6cd262344f5de64eab31804a0f39a7c6337 Modified Files -------------- src/backend/access/heap/tuptoaster.c | 4 ++-- src/backend/commands/cluster.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: During heap rebuild, lock any TOAST index until end of transacti @ 2020-03-21 16:45 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 6+ messages in thread From: Noah Misch @ 2020-03-21 16:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/978da2a95597c97c52b14a27ba29873051ffc59d Modified Files -------------- src/backend/access/heap/tuptoaster.c | 4 ++-- src/backend/commands/cluster.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: During heap rebuild, lock any TOAST index until end of transacti @ 2020-03-21 16:45 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 6+ messages in thread From: Noah Misch @ 2020-03-21 16:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a8f754aea01476641089212f9fff21a74935c370 Modified Files -------------- src/backend/access/heap/tuptoaster.c | 4 ++-- src/backend/commands/cluster.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: During heap rebuild, lock any TOAST index until end of transacti @ 2020-03-21 16:45 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 6+ messages in thread From: Noah Misch @ 2020-03-21 16:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: During heap rebuild, lock any TOAST index until end of transacti @ 2020-03-21 16:45 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 6+ messages in thread From: Noah Misch @ 2020-03-21 16:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ master Details ------- https://git.postgresql.org/pg/commitdiff/e629a01f6973688f77ecff964d9d6bea9bc4b374 Modified Files -------------- src/backend/access/common/toast_internals.c | 4 ++-- src/backend/commands/cluster.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: During heap rebuild, lock any TOAST index until end of transacti @ 2020-03-21 16:45 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 6+ messages in thread From: Noah Misch @ 2020-03-21 16:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4433c6e8c0a5d0891c9bb52d14e73464086c0375 Modified Files -------------- src/backend/access/heap/tuptoaster.c | 4 ++-- src/backend/commands/cluster.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2020-03-21 16:45 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-03-21 16:45 pgsql: During heap rebuild, lock any TOAST index until end of transacti Noah Misch <noah@leadboat.com> 2020-03-21 16:45 pgsql: During heap rebuild, lock any TOAST index until end of transacti Noah Misch <noah@leadboat.com> 2020-03-21 16:45 pgsql: During heap rebuild, lock any TOAST index until end of transacti Noah Misch <noah@leadboat.com> 2020-03-21 16:45 pgsql: During heap rebuild, lock any TOAST index until end of transacti Noah Misch <noah@leadboat.com> 2020-03-21 16:45 pgsql: During heap rebuild, lock any TOAST index until end of transacti Noah Misch <noah@leadboat.com> 2020-03-21 16:45 pgsql: During heap rebuild, lock any TOAST index until end of transacti Noah Misch <noah@leadboat.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox