Re: REVIEW: Track TRUNCATE via pgstat

Поиск
Список
Период
Сортировка
От Alex Shulgin
Тема Re: REVIEW: Track TRUNCATE via pgstat
Дата
Msg-id 87r3vywdyf.fsf@commandprompt.com
обсуждение исходный текст
Ответ на Re: REVIEW: Track TRUNCATE via pgstat  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: REVIEW: Track TRUNCATE via pgstat
Список pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.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


Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: parallel mode and parallel contexts
Следующее
От: Rahila Syed
Дата:
Сообщение: Re: [REVIEW] Re: Compression of full-page-writes