From b47c3598d4dceb053fae5c52ff67f5b763d19bec Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon, 21 Oct 2002 19:59:14 +0000
Subject: [PATCH] Remove unnecessary (and inadequate) check of
 IsTransactionBlock() in pgstat_vacuum_tabstat().  Assume that caller (namely,
 VACUUM) has done the appropriate state checking beforehand.

---
 src/backend/postmaster/pgstat.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c
index 9c7795cd26e..d7da6177d05 100644
--- a/src/backend/postmaster/pgstat.c
+++ b/src/backend/postmaster/pgstat.c
@@ -16,7 +16,7 @@
  *
  *	Copyright (c) 2001, PostgreSQL Global Development Group
  *
- *	$Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.29 2002/09/25 20:31:40 tgl Exp $
+ *	$Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.30 2002/10/21 19:59:14 tgl Exp $
  * ----------
  */
 #include "postgres.h"
@@ -516,14 +516,6 @@ pgstat_vacuum_tabstat(void)
 	if (pgStatSock < 0)
 		return 0;
 
-	/*
-	 * We don't vacuum inside of transaction blocks, because a possible
-	 * later rollback might reactivate objects we didn't find because of
-	 * earlier destruction in the xact.
-	 */
-	if (IsTransactionBlock())
-		return 0;
-
 	/*
 	 * If not done for this transaction, read the statistics collector
 	 * stats file into some hash tables.
-- 
GitLab