Expose BufferUsageAccumDiff().
Fujii Masao <fujii@postgresql.org>
Expose BufferUsageAccumDiff(). Previously pg_stat_statements calculated the difference of buffer counters by its own code even while BufferUsageAccumDiff() had the same code. This commit expose BufferUsageAccumDiff() and makes pg_stat_statements use it for the calculation, in order to simply the code. This change also would be useful for the upcoming patch for the planning counters in pg_stat_statements because the patch will add one more code for the calculation of difference of buffer counters and that can easily be done by using BufferUsageAccumDiff(). Author: Julien Rouhaud Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/bdfee4e0-a304-2498-8da5-3cb52c0a193e@oss.nttdata.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pg_stat_statements/pg_stat_statements.c | modified | +2 −24 |
| src/backend/executor/instrument.c | modified | +1 −3 |
| src/include/executor/instrument.h | modified | +2 −0 |
Discussion
- Planning counters in pg_stat_statements (using pgss_store) 127 messages · 2018-12-29 → 2021-07-26