Itagaki Takahiro <itagaki.takah...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers