Re: pg_stat_transaction patch

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_stat_transaction patch
Дата
Msg-id 16899.1281210615@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_stat_transaction patch  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Список pgsql-hackers
Itagaki Takahiro <itagaki.takahiro@gmail.com> writes:
> "Accessor functions to get so far collected statistics for the current
> transaction"
> https://commitfest.postgresql.org/action/patch_view?id=301

> The latest version of the patch works as expected, and also well-formed.
> I'll mark the patch to "Ready for Committer".

I'm working through this patch now.  I kind of think that we ought to
drop the functions and view columns that claim to report live/dead
tuples.  In the first place, they're misnamed, because what they're
actually reporting is delta values (ie, new live tuples or new dead
tuples).  In the second place, they don't seem very useful.  The
live_tuples count is absolutely, positively guaranteed to read out as
zero, because a transaction that hasn't reached commit cannot have
created any known-live tuples.  The dead_tuples count can read out as
positive under certain circumstances, for example if a subtransaction
inserted some tuples and was then rolled back --- we know for certain
those tuples are dead and so the t_delta_dead_tuples count gets
incremented at subtransaction rollback.  But for the most part the
dead_tuples count is going to be a lot less than people might expect
based on what the transaction's done so far.

If we keep these we're going to have to document them a lot better
than the submitted patch does.  But I think we should just take 'em out.
Comments?
        regards, tom lane


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

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: Moderator on Committers?
Следующее
От: Gordon Shannon
Дата:
Сообщение: Re: Surprising dead_tuple_count from pgstattuple