From 8d80b0d980c327edf162e20fdc829559e8aff224 Mon Sep 17 00:00:00 2001 From: Jan Wieck Date: Fri, 22 Jun 2001 19:16:24 +0000 Subject: Statistical system views (yet without the config stuff, but it's hard to keep such massive changes in sync with the tree so I need to get it in and work from there now). Jan --- src/backend/access/transam/xact.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/backend/access/transam/xact.c') diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 9e048deba6b..293980ea511 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.103 2001/06/19 19:42:15 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.104 2001/06/22 19:16:21 wieck Exp $ * * NOTES * Transaction aborts can now occur two ways: @@ -176,6 +176,8 @@ #include "utils/relcache.h" #include "utils/temprel.h" +#include "pgstat.h" + extern bool SharedBufferChanged; static void AbortTransaction(void); @@ -1083,6 +1085,9 @@ CommitTransaction(void) SharedBufferChanged = false;/* safest place to do it */ + /* Count transaction commit in statistics collector */ + pgstat_count_xact_commit(); + /* * done with commit processing, set current transaction state back to * default @@ -1163,6 +1168,9 @@ AbortTransaction(void) AtEOXact_portals(); RecordTransactionAbort(); + /* Count transaction abort in statistics collector */ + pgstat_count_xact_rollback(); + RelationPurgeLocalRelation(false); AtEOXact_temp_relations(false); smgrDoPendingDeletes(false); -- cgit v1.2.3