diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-11-08 22:10:03 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-11-08 22:10:03 +0000 |
commit | 3908473c809d5c24940faebfabdad673f4302178 (patch) | |
tree | 6a1989499ee61771c7764afd2b24d12ebd25b8fb /src/include/storage/bufmgr.h | |
parent | ebe0b236909732c75d665c73363bd4ac7a7aa138 (diff) | |
download | postgresql-3908473c809d5c24940faebfabdad673f4302178.tar.gz postgresql-3908473c809d5c24940faebfabdad673f4302178.zip |
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.
Diffstat (limited to 'src/include/storage/bufmgr.h')
-rw-r--r-- | src/include/storage/bufmgr.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h index 0ed4837305d..22c0ccde7d5 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -7,15 +7,16 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: bufmgr.h,v 1.42 2000/10/28 16:21:00 vadim Exp $ + * $Id: bufmgr.h,v 1.43 2000/11/08 22:10:02 tgl Exp $ * *------------------------------------------------------------------------- */ #ifndef BUFMGR_H #define BUFMGR_H -#include "storage/buf_internals.h" #include "access/xlogdefs.h" +#include "storage/buf_internals.h" +#include "storage/relfilenode.h" typedef void *Block; @@ -151,7 +152,7 @@ extern int WriteBuffer(Buffer buffer); extern int WriteNoReleaseBuffer(Buffer buffer); extern Buffer ReleaseAndReadBuffer(Buffer buffer, Relation relation, BlockNumber blockNum); -extern int FlushBuffer(Buffer buffer, bool release); +extern int FlushBuffer(Buffer buffer, bool sync, bool release); extern void InitBufferPool(IPCKey key); extern void PrintBufferUsage(FILE *statfp); @@ -162,7 +163,8 @@ extern void FlushBufferPool(void); extern BlockNumber BufferGetBlockNumber(Buffer buffer); extern BlockNumber RelationGetNumberOfBlocks(Relation relation); extern int FlushRelationBuffers(Relation rel, BlockNumber firstDelBlock); -extern void ReleaseRelationBuffers(Relation rel); +extern void DropRelationBuffers(Relation rel); +extern void DropRelFileNodeBuffers(RelFileNode rnode); extern void DropBuffers(Oid dbid); extern void PrintPinnedBufs(void); extern int BufferShmemSize(void); |