-
- Downloads
Make DDL operations play nicely with Serializable Snapshot Isolation.
Truncating or dropping a table is treated like deletion of all tuples, and check for conflicts accordingly. If a table is clustered or rewritten by ALTER TABLE, all predicate locks on the heap are promoted to relation-level locks, because the tuple or page ids of any existing tuples will change and won't be valid after rewriting the table. Arguably ALTER TABLE should be treated like a mass-UPDATE of every row, but if you e.g change the datatype of a column, you could also argue that it's just a change to the physical layout, not a logical change. Reindexing promotes all locks on the index to relation-level lock on the heap. Kevin Grittner, with a lot of cosmetic changes by me.
Showing
- src/backend/catalog/heap.c 9 additions, 0 deletionssrc/backend/catalog/heap.c
- src/backend/catalog/index.c 13 additions, 0 deletionssrc/backend/catalog/index.c
- src/backend/commands/cluster.c 9 additions, 0 deletionssrc/backend/commands/cluster.c
- src/backend/commands/tablecmds.c 19 additions, 0 deletionssrc/backend/commands/tablecmds.c
- src/backend/storage/lmgr/predicate.c 445 additions, 76 deletionssrc/backend/storage/lmgr/predicate.c
- src/include/storage/predicate.h 2 additions, 0 deletionssrc/include/storage/predicate.h
- src/include/storage/predicate_internals.h 2 additions, 4 deletionssrc/include/storage/predicate_internals.h
Loading
Please register or sign in to comment