Re: Small TRUNCATE glitch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Small TRUNCATE glitch
Date
Msg-id 25100.1207261419@sss.pgh.pa.us
Whole thread Raw
In response to Re: Small TRUNCATE glitch  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Small TRUNCATE glitch  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane wrote:
>> Just noticed that TRUNCATE fails to clear the stats collector's counts
>> for the table.  I am not sure if it should reset the event counts or
>> not (any thoughts?) but surely it is wrong to not zero the live/dead
>> tuple counts.

> Agreed, the live/dead counters should be reset.  Regarding event counts,
> my take is that we should have a separate statement count for truncate
> (obviously not a tuple count), and the others should be left alone.

I thought some more about how to do it, and stumbled over how to cope
with TRUNCATE being rolled back.  That nixed my first idea of just
having TRUNCATE send a zero-the-counters-now message.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: psql \G command -- send query and output using extended format
Next
From: Alvaro Herrera
Date:
Subject: Re: psql \G command -- send query and output using extended format