| From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> | 
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org | 
| Subject: | pgsql: Make DDL operations play nicely with Serializable Snapshot Isola | 
| Date: | 2011-06-08 11:13:06 | 
| Message-ID: | E1QUGh8-0007Ra-5M@gemulon.postgresql.org | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-committers | 
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.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/8f9622bbb3c02b06176760c3ca2d33c5b5f629a7
Modified Files
--------------
src/backend/catalog/heap.c                |    9 +
src/backend/catalog/index.c               |   13 +
src/backend/commands/cluster.c            |    9 +
src/backend/commands/tablecmds.c          |   19 +
src/backend/storage/lmgr/predicate.c      |  521 ++++++++++++++++++++++++-----
src/include/storage/predicate.h           |    2 +
src/include/storage/predicate_internals.h |    6 +-
7 files changed, 499 insertions(+), 80 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2011-06-08 16:53:25 | pgsql: Allow domains over arrays to match ANYARRAY parameters again. | 
| Previous Message | Robert Haas | 2011-06-08 02:17:19 | pgsql: Complain politely about access temp/unlogged tables during recov |