diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2012-10-17 12:37:20 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2012-10-17 12:37:20 -0400 |
commit | cacb65263b99c3d96aa4b250cdbda05072ade03e (patch) | |
tree | 3798ceac7152c52b9d0be881c7eaa65a0642256e /src/backend/storage/buffer/bufmgr.c | |
parent | f34d1fa0c8bd587a165234e0971bba8dc5e1fd2a (diff) | |
download | postgresql-cacb65263b99c3d96aa4b250cdbda05072ade03e.tar.gz postgresql-cacb65263b99c3d96aa4b250cdbda05072ade03e.zip |
Revert "Use "transient" files for blind writes, take 2".
This reverts commit fba105b1099f4f5fa7283bb17cba6fed2baa8d0c.
That approach had problems with the smgr-level state not tracking what
we really want to happen, and with the VFD-level state not tracking the
smgr-level state very well either. In consequence, it was still possible
to hold kernel file descriptors open for long-gone tables (as in recent
report from Tore Halset), and yet there were also cases of FDs being closed
undesirably soon. A replacement implementation will follow.
Diffstat (limited to 'src/backend/storage/buffer/bufmgr.c')
-rw-r--r-- | src/backend/storage/buffer/bufmgr.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 244f4e216c3..e3f8261db6b 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -1847,10 +1847,7 @@ BufferGetTag(Buffer buffer, RelFileNode *rnode, ForkNumber *forknum, * written.) * * If the caller has an smgr reference for the buffer's relation, pass it - * as the second parameter. If not, pass NULL. In the latter case, the - * relation will be marked as "transient" so that the corresponding - * kernel-level file descriptors are closed when the current transaction ends, - * if any. + * as the second parameter. If not, pass NULL. */ static void FlushBuffer(volatile BufferDesc *buf, SMgrRelation reln) @@ -1872,12 +1869,9 @@ FlushBuffer(volatile BufferDesc *buf, SMgrRelation reln) errcontext.previous = error_context_stack; error_context_stack = &errcontext; - /* Find smgr relation for buffer, and mark it as transient */ + /* Find smgr relation for buffer */ if (reln == NULL) - { reln = smgropen(buf->tag.rnode, InvalidBackendId); - smgrsettransient(reln); - } TRACE_POSTGRESQL_BUFFER_FLUSH_START(buf->tag.forkNum, buf->tag.blockNum, |