[HACKERS] Transaction local statistics are incorrect at speed

2014-04-07 Thread Tom Lane
My Salesforce colleague Teja Mupparti found an interesting bug. Consider the following example: drop table if exists test; create table test(i int); insert into test values(1); select pg_sleep(1); begin; insert into test values(2); insert into test values(3); select

Re: [HACKERS] Transaction local statistics are incorrect at speed

2014-04-07 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: This seems like a pretty clear bug to me; does anyone want to argue that it isn't? I'd agree that it's a bug. In the case of pg_stat_get_xact_tuples_inserted and a couple of other routines, it would be entirely trivial to fix: just ignore