mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Revert "Use "transient" files for blind writes, take 2".
This reverts commit fba105b109.
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.
This commit is contained in:
@@ -300,9 +300,6 @@ mdcreate(SMgrRelation reln, ForkNumber forkNum, bool isRedo)
|
||||
|
||||
pfree(path);
|
||||
|
||||
if (reln->smgr_transient)
|
||||
FileSetTransient(fd);
|
||||
|
||||
reln->md_fd[forkNum] = _fdvec_alloc();
|
||||
|
||||
reln->md_fd[forkNum]->mdfd_vfd = fd;
|
||||
@@ -585,9 +582,6 @@ mdopen(SMgrRelation reln, ForkNumber forknum, ExtensionBehavior behavior)
|
||||
|
||||
pfree(path);
|
||||
|
||||
if (reln->smgr_transient)
|
||||
FileSetTransient(fd);
|
||||
|
||||
reln->md_fd[forknum] = mdfd = _fdvec_alloc();
|
||||
|
||||
mdfd->mdfd_vfd = fd;
|
||||
@@ -1680,9 +1674,6 @@ _mdfd_openseg(SMgrRelation reln, ForkNumber forknum, BlockNumber segno,
|
||||
if (fd < 0)
|
||||
return NULL;
|
||||
|
||||
if (reln->smgr_transient)
|
||||
FileSetTransient(fd);
|
||||
|
||||
/* allocate an mdfdvec entry for it */
|
||||
v = _fdvec_alloc();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user