PostgreSQL Lock Conflicts

Database engineering course | @hnasr |

ShareUpdateExclusiveLock

The ShareUpdateExclusiveLock lock is a Table lock. This list shows the commands that acquire ShareUpdateExclusiveLock and what locks conflicts with it.

The following commands acquire ShareUpdateExclusiveLock Table lock

  1. VACUUM
  2. REINDEX CONCURRENTLY
  3. DROP INDEX CONCURRENTLY
  4. CREATE STATISTICS
  5. CREATE INDEX CONCURRENTLY
  6. COMMENT ON
  7. ANALYZE
  8. ALTER TABLE VALIDATE CONSTRAINT
  9. ALTER TABLE SET WITHOUT CLUSTER
  10. ALTER TABLE SET TOAST
  11. ALTER TABLE SET STATISTICS
  12. ALTER TABLE SET N_DISTINCT
  13. ALTER TABLE SET FILLFACTOR
  14. ALTER TABLE SET AUTOVACUUUM
  15. ALTER TABLE DETACH PARTITION CONCURRENTLY (PARENT)
  16. ALTER TABLE CLUSTER ON
  17. ALTER TABLE ATTACH PARTITION (PARENT)
  18. ALTER INDEX (RENAME)

The following are table locks conflicting with ShareUpdateExclusiveLock

  1. ShareUpdateExclusiveLock
  2. ShareLock
  3. ShareRowExclusiveLock
  4. ExclusiveLock
  5. AccessExclusiveLock