Re: Less than ideal error reporting in pg_stat_statements
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@heroku.com>
Cc: Jim Nasby <Jim.Nasby@bluetreble.com>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2015-10-04T20:01:13Z
Lists: pgsql-hackers
Peter Geoghegan <pg@heroku.com> writes: > I'm not clear on what you actually propose to do to "make > entry_dealloc's recomputation of mean_query_len sane", but I think you > are talking about something distinct from what I've proposed Ah, right, sorry. I meant to make its result match what gc_texts would get, by not falsely counting entries with dropped texts. That's not what you have in your patch but it seems like an easy enough fix. > I'd be quite happy if you did everything listed, and also left the > extra discrimination against sticky entries within entry_dealloc in -- > consider what happens when a huge malloc() ends up swapping with an > exclusive lock held, and consider that repeated, failed data > integration transactions are implicated in this in a big way when a > problem appears in the wild. A big part of the problem here was that > garbage collection did not run often enough. Hm. The problem I've got with this is that then mean_query_len means something significantly different after entry_dealloc than it does after gc_texts. I'd be okay with changing *both* of those functions to ignore sticky entries in the calculation, if that seems reasonable to you. > In other words, I'd be fine with *not* doing the query size filter > thing for now, since that is something that seems like an extra > defense and not core to the problem. I was kind of ambivalent about > doing that part myself, actually. Agreed on that part. regards, tom lane
Commits
-
Be more wary about 32-bit integer overflow in pg_stat_statements.
- c67c2e2a2939 16.0 landed
- dd414bf4e047 10.22 landed
- 82ebc70d1c7f 15.0 landed
- 6b67db10c366 13.8 landed
- 6608a4305636 12.12 landed
- 17fd203b414e 14.5 landed
- 06f6a07ba465 11.17 landed