OSDN Git Service

Several changes here, not very related but touching some of the same files.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 24 Sep 1999 00:25:33 +0000 (00:25 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 24 Sep 1999 00:25:33 +0000 (00:25 +0000)
commite812458b273be00bde34fb74991ab4a99c24ab30
treee7460ae5c0344782f6f6068399f6f7eab5be96f6
parentad791c1d140af97d93ee98883e2c45413d6f9836
Several changes here, not very related but touching some of the same files.
* Buffer refcount cleanup (per my "progress report" to pghackers, 9/22).
* Add links to backend PROC structs to sinval's array of per-backend info,
and use these links for routines that need to check the state of all
backends (rather than the slow, complicated search of the ShmemIndex
hashtable that was used before).  Add databaseOID to PROC structs.
* Use this to implement an interlock that prevents DESTROY DATABASE of
a database containing running backends.  (It's a little tricky to prevent
a concurrently-starting backend from getting in there, since the new
backend is not able to lock anything at the time it tries to look up
its database in pg_database.  My solution is to recheck that the DB is
OK at the end of InitPostgres.  It may not be a 100% solution, but it's
a lot better than no interlock at all...)
* In ALTER TABLE RENAME, flush buffers for the relation before doing the
rename of the physical files, to ensure we don't get failures later from
mdblindwrt().
* Update TRUNCATE patch so that it actually compiles against current
sources :-(.
You should do "make clean all" after pulling these changes.
43 files changed:
src/backend/access/gist/gist.c
src/backend/access/hash/hash.c
src/backend/access/heap/heapam.c
src/backend/access/rtree/rtree.c
src/backend/access/transam/xact.c
src/backend/catalog/heap.c
src/backend/catalog/index.c
src/backend/commands/dbcommands.c
src/backend/commands/rename.c
src/backend/commands/vacuum.c
src/backend/executor/execMain.c
src/backend/executor/execQual.c
src/backend/executor/execTuples.c
src/backend/executor/nodeAppend.c
src/backend/executor/nodeGroup.c
src/backend/executor/nodeIndexscan.c
src/backend/executor/nodeMaterial.c
src/backend/executor/nodeMergejoin.c
src/backend/executor/nodeSeqscan.c
src/backend/executor/nodeSubplan.c
src/backend/storage/buffer/buf_init.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/freelist.c
src/backend/storage/buffer/localbuf.c
src/backend/storage/ipc/shmem.c
src/backend/storage/ipc/sinval.c
src/backend/storage/ipc/sinvaladt.c
src/backend/storage/lmgr/proc.c
src/backend/storage/smgr/md.c
src/backend/tcop/postgres.c
src/backend/tcop/pquery.c
src/backend/utils/init/postinit.c
src/backend/utils/misc/database.c
src/include/executor/executor.h
src/include/miscadmin.h
src/include/nodes/execnodes.h
src/include/storage/buf_internals.h
src/include/storage/bufmgr.h
src/include/storage/proc.h
src/include/storage/shmem.h
src/include/storage/sinval.h
src/include/storage/sinvaladt.h
src/test/regress/output/misc.source