From: | Alex Shulgin <ash(at)commandprompt(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: REVIEW: Track TRUNCATE via pgstat |
Date: | 2014-12-17 14:25:28 |
Message-ID: | 87r3vywdyf.fsf@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
>
>> Even with the current approach of checking the stats after every
>> isolated case it's sometimes takes quite a little more than a glance
>> to verify correctness due to side-effects of rollback (ins/upd/del
>> counters are still updated), and the way stats are affecting the dead
>> tuples counter.
>
> Honestly I think pg_regress is not the right tool to test stat counter
> updates. It kind-of works today, but only because we don't stress it
> too much. If you want to create a new test framework for pgstats, and
> include some tests for truncate, be my guest.
OK, I think I have now all bases covered, though the updated patch is
not that "pretty".
The problem is that we don't know in advance if the (sub)transaction is
going to succeed or abort, and in case of aborted truncate we need to
use the stats gathered prior to truncate. Thus the need to track
insert/update/deletes that happened before first truncate separately.
To the point of making a dedicated pgstat testing tool: let's have
another TODO item?
--
Alex
Attachment | Content-Type | Size |
---|---|---|
truncate-and-pgstat-v0.4.patch | text/x-diff | 21.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Rahila Syed | 2014-12-17 14:33:19 | Re: [REVIEW] Re: Compression of full-page-writes |
Previous Message | Simon Riggs | 2014-12-17 14:16:01 | Re: parallel mode and parallel contexts |