Make DROP TABLE rollback-able: postpone physical file delete until commit.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 3908473c809d5c24940faebfabdad673f4302178
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2000-11-08T22:10:03Z
Releases: 7.1.1
Make DROP TABLE rollback-able: postpone physical file delete until commit.
(WAL logging for this is not done yet, however.)  Clean up a number of really
crufty things that are no longer needed now that DROP behaves nicely.  Make
temp table mapper do the right things when drop or rename affecting a temp
table is rolled back.  Also, remove "relation modified while in use" error
check, in favor of locking tables at first reference and holding that lock
throughout the statement.

Files

PathChange+/−
src/backend/access/common/tupdesc.c modified +40 −15
src/backend/access/gist/gist.c modified +4 −5
src/backend/access/hash/hash.c modified +4 −5
src/backend/access/heap/heapam.c modified +10 −26
src/backend/access/nbtree/nbtree.c modified +4 −7
src/backend/access/rtree/rtree.c modified +4 −5
src/backend/access/transam/varsup.c modified +2 −2
src/backend/access/transam/xact.c modified +9 −2
src/backend/access/transam/xlogutils.c modified +3 −4
src/backend/bootstrap/bootstrap.c modified +2 −2
src/backend/catalog/heap.c modified +39 −63
src/backend/catalog/index.c modified +93 −130
src/backend/commands/cluster.c modified +55 −87
src/backend/commands/command.c modified +7 −3
src/backend/commands/comment.c modified +2 −6
src/backend/commands/creatinh.c modified +18 −18
src/backend/commands/indexcmds.c modified +20 −2
src/backend/commands/rename.c modified +8 −82
src/backend/commands/trigger.c modified +39 −15
src/backend/executor/execAmi.c modified +21 −23
src/backend/parser/analyze.c modified +26 −4
src/backend/parser/gram.y modified +3 −9
src/backend/parser/parse_clause.c modified +31 −6
src/backend/parser/parse_relation.c modified +54 −7
src/backend/rewrite/rewriteHandler.c modified +48 −14
src/backend/storage/buffer/bufmgr.c modified +152 −48
src/backend/storage/buffer/localbuf.c modified +11 −6
src/backend/storage/buffer/xlog_bufmgr.c modified +114 −28
src/backend/storage/lmgr/lock.c modified +101 −76
src/backend/storage/smgr/md.c modified +62 −100
src/backend/storage/smgr/mm.c modified +4 −2
src/backend/storage/smgr/smgr.c modified +112 −22
src/backend/utils/cache/inval.c modified +10 −138
src/backend/utils/cache/relcache.c modified +18 −64
src/backend/utils/cache/temprel.c modified +147 −135
src/include/catalog/heap.h modified +2 −2
src/include/catalog/index.h modified +3 −3
src/include/parser/parse_clause.h modified +2 −1
src/include/parser/parse_node.h modified +2 −1
src/include/storage/buf_internals.h modified +2 −2
src/include/storage/bufmgr.h modified +6 −4
src/include/storage/smgr.h modified +8 −7
src/include/utils/inval.h modified +1 −3
src/include/utils/rel.h modified +1 −2
src/include/utils/temprel.h modified +2 −2
src/test/regress/expected/errors.out modified +2 −2