diff --git a/src/backend/storage/buffer/xlog_bufmgr.c b/src/backend/storage/buffer/xlog_bufmgr.c
index b00edd1be86e5c78a551ba553cb894485146b1cb..ff6bff29a1d82ead0266a4760dcc8e92f4f96bb5 100644
--- a/src/backend/storage/buffer/xlog_bufmgr.c
+++ b/src/backend/storage/buffer/xlog_bufmgr.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/xlog_bufmgr.c,v 1.3 2000/11/10 03:53:44 vadim Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/xlog_bufmgr.c,v 1.4 2000/11/22 02:19:14 inoue Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1158,7 +1158,8 @@ BlockNumber
 RelationGetNumberOfBlocks(Relation relation)
 {
 	return ((relation->rd_myxactonly) ? relation->rd_nblocks :
-			smgrnblocks(DEFAULT_SMGR, relation));
+		((relation->rd_rel->relkind == RELKIND_VIEW) ? 0 :
+			smgrnblocks(DEFAULT_SMGR, relation)));
 }
 
 /* ---------------------------------------------------------------------