aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/buffer/bufmgr.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-10-17 12:37:15 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2012-10-17 12:37:15 -0400
commita1f064fc2bd259dc8d75313df1cf9d5c294437f9 (patch)
treebaa31f85e79fb3b4191de3b72dc8d404c2caa769 /src/backend/storage/buffer/bufmgr.c
parent4be1d015b8bf1ae43dd7c99fe6039e00b02cfc28 (diff)
downloadpostgresql-a1f064fc2bd259dc8d75313df1cf9d5c294437f9.tar.gz
postgresql-a1f064fc2bd259dc8d75313df1cf9d5c294437f9.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.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 77d4fbf0b9a..91ef1a35e3e 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -1882,10 +1882,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)
@@ -1909,12 +1906,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,