|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * 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 $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -205,15 +205,6 @@ mdunlink(Relation reln)
|
205 | 205 | */
|
206 | 206 | if (reln->rd_unlinked && reln->rd_fd < 0)
|
207 | 207 | return SM_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); |
217 | 208 | /*
|
218 | 209 | * Force all segments of the relation to be opened, so that we
|
219 | 210 | * won't miss deleting any of them.
|
@@ -786,7 +777,6 @@ mdtruncate(Relation reln, int nblocks)
|
786 | 777 | #ifndef LET_OS_MANAGE_FILESIZE
|
787 | 778 | MemoryContext oldcxt;
|
788 | 779 | int priorblocks;
|
789 |
| - bool invalregistered = false; |
790 | 780 | #endif
|
791 | 781 |
|
792 | 782 | /* NOTE: mdnblocks makes sure we have opened all existing segments,
|
@@ -818,20 +808,6 @@ mdtruncate(Relation reln, int nblocks)
|
818 | 808 | * a big file...
|
819 | 809 | */
|
820 | 810 | 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 |
| - } |
835 | 811 | FileUnlink(v->mdfd_vfd);
|
836 | 812 | v = v->mdfd_chain;
|
837 | 813 | Assert(ov != &Md_fdvec[fd]); /* we never drop the 1st segment */
|
|
0 commit comments