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

Commit708f67c

Browse files
committed
Blowaway relation buffers from buffer pool before truncation.
1 parent94e52d3 commit708f67c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

‎src/backend/commands/vacuum.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.47 1997/09/12 04:07:30 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.48 1997/09/2207:12:33 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -56,6 +56,8 @@
5656

5757
#include<port-protos.h>
5858

59+
externintBlowawayRelationBuffers(Relationrdesc,BlockNumberblock);
60+
5961
boolVacuumRunning= false;
6062

6163
staticPortalvc_portal;
@@ -1394,6 +1396,9 @@ Elapsed %u/%u sec.",
13941396
/* truncate relation */
13951397
if (blkno<nblocks)
13961398
{
1399+
i=BlowawayRelationBuffers(onerel,blkno);
1400+
if (i<0)
1401+
elog (FATAL,"VACUUM (vc_rpfheap): BlowawayRelationBuffers returned %d",i);
13971402
blkno=smgrtruncate(onerel->rd_rel->relsmgr,onerel,blkno);
13981403
Assert(blkno >=0);
13991404
vacrelstats->npages=blkno;/* set new number of blocks */
@@ -1465,6 +1470,10 @@ vc_vacheap(VRelStats *vacrelstats, Relation onerel, VPageList Vvpl)
14651470
* it) before truncation
14661471
*/
14671472
FlushBufferPool(!TransactionFlushEnabled());
1473+
1474+
i=BlowawayRelationBuffers(onerel,nblocks);
1475+
if (i<0)
1476+
elog (FATAL,"VACUUM (vc_vacheap): BlowawayRelationBuffers returned %d",i);
14681477

14691478
nblocks=smgrtruncate(onerel->rd_rel->relsmgr,onerel,nblocks);
14701479
Assert(nblocks >=0);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp