summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorHiroshi Inoue <inoue@tpf.co.jp>2000-02-07 02:38:18 +0000
committerHiroshi Inoue <inoue@tpf.co.jp>2000-02-07 02:38:18 +0000
commit7d738f958673fc2bd5676ac492606486499595df (patch)
treeb2b80095f4c06bebc4f5fe5a90fc98247f122c3b /src/backend
parent4acf890948cca061d7da185bb875c9733c5e74bb (diff)
downloadpostgresql-7d738f958673fc2bd5676ac492606486499595df.tar.gz
Remove ugly call ImmediateSharedRelationCacheInvalidate()
from md.c.
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/storage/smgr/md.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 888ef88684..7382b1867d 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.63 2000/01/26 05:57:05 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.64 2000/02/07 02:38:18 inoue Exp $
*
*-------------------------------------------------------------------------
*/
@@ -206,15 +206,6 @@ mdunlink(Relation reln)
if (reln->rd_unlinked && reln->rd_fd < 0)
return SM_SUCCESS;
/*
- * This call isn't good for independency of md stuff,but
- * mdunlink() unlinks the base file immediately and couldn't
- * be rollbacked in case of abort. We must guarantee all
- * backends' relation cache invalidation here.
- * This would be unnecessary if unlinking is postponed
- * till end of transaction.
- */
- ImmediateSharedRelationCacheInvalidate(reln);
- /*
* Force all segments of the relation to be opened, so that we
* won't miss deleting any of them.
*/
@@ -786,7 +777,6 @@ mdtruncate(Relation reln, int nblocks)
#ifndef LET_OS_MANAGE_FILESIZE
MemoryContext oldcxt;
int priorblocks;
- bool invalregistered = false;
#endif
/* NOTE: mdnblocks makes sure we have opened all existing segments,
@@ -818,20 +808,6 @@ mdtruncate(Relation reln, int nblocks)
* a big file...
*/
FileTruncate(v->mdfd_vfd, 0);
- /*
- * To call ImmediateSharedRelationCacheInvalidate() here
- * isn't good for independency of md stuff,but smgrunlink()
- * removes the base file immediately and couldn't be
- * rollbacked in case of abort. We must guarantee
- * all backends' relation cache invalidation here.
- * This would be unnecessary if the truncation is postponed
- * till end of transaction.
- */
- if (!invalregistered)
- {
- ImmediateSharedRelationCacheInvalidate(reln);
- invalregistered = true;
- }
FileUnlink(v->mdfd_vfd);
v = v->mdfd_chain;
Assert(ov != &Md_fdvec[fd]); /* we never drop the 1st segment */