Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7d738f9

Browse files
author
Hiroshi Inoue
committed
Remove ugly call ImmediateSharedRelationCacheInvalidate()
from md.c.
1 parent4acf890 commit7d738f9

File tree

1 file changed

+1
-25
lines changed
  • src/backend/storage/smgr

1 file changed

+1
-25
lines changed

‎src/backend/storage/smgr/md.c

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.63 2000/01/26 05:57:05 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.64 2000/02/07 02:38:18 inoue Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -205,15 +205,6 @@ mdunlink(Relation reln)
205205
*/
206206
if (reln->rd_unlinked&&reln->rd_fd<0)
207207
returnSM_SUCCESS;
208-
/*
209-
* This call isn't good for independency of md stuff,but
210-
* mdunlink() unlinks the base file immediately and couldn't
211-
* be rollbacked in case of abort. We must guarantee all
212-
* backends' relation cache invalidation here.
213-
* This would be unnecessary if unlinking is postponed
214-
* till end of transaction.
215-
*/
216-
ImmediateSharedRelationCacheInvalidate(reln);
217208
/*
218209
* Force all segments of the relation to be opened, so that we
219210
* won't miss deleting any of them.
@@ -786,7 +777,6 @@ mdtruncate(Relation reln, int nblocks)
786777
#ifndefLET_OS_MANAGE_FILESIZE
787778
MemoryContextoldcxt;
788779
intpriorblocks;
789-
boolinvalregistered= false;
790780
#endif
791781

792782
/* NOTE: mdnblocks makes sure we have opened all existing segments,
@@ -818,20 +808,6 @@ mdtruncate(Relation reln, int nblocks)
818808
* a big file...
819809
*/
820810
FileTruncate(v->mdfd_vfd,0);
821-
/*
822-
* To call ImmediateSharedRelationCacheInvalidate() here
823-
* isn't good for independency of md stuff,but smgrunlink()
824-
* removes the base file immediately and couldn't be
825-
* rollbacked in case of abort. We must guarantee
826-
* all backends' relation cache invalidation here.
827-
* This would be unnecessary if the truncation is postponed
828-
* till end of transaction.
829-
*/
830-
if (!invalregistered)
831-
{
832-
ImmediateSharedRelationCacheInvalidate(reln);
833-
invalregistered= true;
834-
}
835811
FileUnlink(v->mdfd_vfd);
836812
v=v->mdfd_chain;
837813
Assert(ov!=&Md_fdvec[fd]);/* we never drop the 1st segment */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp