Add support for tracking call counts and elapsed runtime for user-defined
Tom Lane <tgl@sss.pgh.pa.us>
Add support for tracking call counts and elapsed runtime for user-defined functions. Note that because this patch changes FmgrInfo, any external C functions you might be testing with 8.4 will need to be recompiled. Patch by Martin Pihlak, some editorialization by me (principally, removing tracking of getrusage() numbers)
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/config.sgml | modified | +17 −1 |
| doc/src/sgml/monitoring.sgml | modified | +49 −7 |
| src/backend/catalog/system_views.sql | modified | +13 −1 |
| src/backend/commands/trigger.c | modified | +7 −1 |
| src/backend/commands/vacuum.c | modified | +2 −2 |
| src/backend/executor/execQual.c | modified | +25 −1 |
| src/backend/postmaster/autovacuum.c | modified | +2 −2 |
| src/backend/postmaster/pgstat.c | modified | +449 −22 |
| src/backend/tcop/postgres.c | modified | +2 −2 |
| src/backend/utils/adt/pgstatfuncs.c | modified | +39 −2 |
| src/backend/utils/fmgr/fmgr.c | modified | +34 −5 |
| src/backend/utils/fmgr/README | modified | +7 −5 |
| src/backend/utils/misc/guc.c | modified | +17 −2 |
| src/backend/utils/misc/postgresql.conf.sample | modified | +1 −0 |
| src/include/catalog/catversion.h | modified | +2 −2 |
| src/include/catalog/pg_proc.h | modified | +8 −1 |
| src/include/fmgr.h | modified | +2 −1 |
| src/include/pgstat.h | modified | +132 −6 |
| src/include/portability/instr_time.h | modified | +20 −3 |
| src/test/regress/expected/rules.out | modified | +2 −1 |