Skip site navigation (1) Skip section navigation (2)

Re: stats for failed transactions (was Re: [GENERAL] VACUUM Question)

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>, Michael Fuhr <mike(at)fuhr(dot)org>,Jan Wieck <JanWieck(at)Yahoo(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: stats for failed transactions (was Re: [GENERAL] VACUUM Question)
Date: 2006-01-27 15:53:38
Message-ID: 20060127155338.GD18334@surnet.cl (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
Tom Lane wrote:

> I think this is the fault of the stats system design.  AFAICT from a
> quick look at the code, inserted/updated/deleted tuples are reported
> to the collector in the same way regardless of whether the sending
> transaction committed or rolled back.  I think this is unquestionably
> a bug, at least for autovacuum's purposes --- though it might be OK
> for the original intent of the stats system, which was simply to track
> activity levels.
> 
> Any thoughts about how it ought to work?

I don't remember exactly how it works -- I think the activity (insert,
update, delete) counters are kept separately from commit/rollback
status, right?  Maybe we should keep three separate counters: "current
transaction counters" and "counters for transactions that were
aborted/committed".  We only send the latter counts, and the former are
added to them when the transaction ends.

-- 
Alvaro Herrera                        http://www.advogato.org/person/alvherre
"Aprende a avergonzarte más ante ti que ante los demás" (Demócrito)

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2006-01-27 15:56:10
Subject: Re: Adding a --quiet option to initdb
Previous:From: Tom LaneDate: 2006-01-27 15:50:37
Subject: Re: Adding a --quiet option to initdb

pgsql-general by date

Next:From: Tom LaneDate: 2006-01-27 15:56:12
Subject: Re: stats for failed transactions (was Re: [GENERAL] VACUUM Question)
Previous:From: Tom LaneDate: 2006-01-27 15:32:34
Subject: Re: PG_RESTORE and database size

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group