File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -6349,10 +6349,13 @@ heap_abort_speculative(Relation relation, const ItemPointerData *tid)
63496349 * Since this is intended for system catalogs and SERIALIZABLE doesn't cover
63506350 * DDL, this doesn't guarantee any particular predicate locking.
63516351 *
6352- * One could modify this to return true for tuples with delete in progress,
6353- * All inplace updaters take a lock that conflicts with DROP. If explicit
6354- * "DELETE FROM pg_class" is in progress, we'll wait for it like we would an
6355- * update.
6352+ * heap_delete() is a rarer source of blocking transactions (xwait). We'll
6353+ * wait for such a transaction just like for the normal heap_update() case.
6354+ * Normal concurrent DROP commands won't cause that, because all inplace
6355+ * updaters take some lock that conflicts with DROP. An explicit SQL "DELETE
6356+ * FROM pg_class" can cause it. By waiting, if the concurrent transaction
6357+ * executed both "DELETE FROM pg_class" and "INSERT INTO pg_class", our caller
6358+ * can find the successor tuple.
63566359 *
63576360 * Readers of inplace-updated fields expect changes to those fields are
63586361 * durable. For example, vac_truncate_clog() reads datfrozenxid from
Original file line number Diff line number Diff line change @@ -781,10 +781,11 @@ systable_endscan_ordered(SysScanDesc sysscan)
781781 * systable_inplace_update_begin --- update a row "in place" (overwrite it)
782782 *
783783 * Overwriting violates both MVCC and transactional safety, so the uses of
784- * this function in Postgres are extremely limited. Nonetheless we find some
785- * places to use it. See README.tuplock section "Locking to write
786- * inplace-updated tables" and later sections for expectations of readers and
787- * writers of a table that gets inplace updates. Standard flow:
784+ * this function in Postgres are extremely limited. This makes no effort to
785+ * support updating cache key columns or other indexed columns. Nonetheless
786+ * we find some places to use it. See README.tuplock section "Locking to
787+ * write inplace-updated tables" and later sections for expectations of
788+ * readers and writers of a table that gets inplace updates. Standard flow:
788789 *
789790 * ... [any slow preparation not requiring oldtup] ...
790791 * systable_inplace_update_begin([...], &tup, &inplace_state);
You can’t perform that action at this time.
0 commit comments