Add pg_stat_get_snapshot_timestamp() to show statistics snapshot timestamp.
Tom Lane <tgl@sss.pgh.pa.us>
Add pg_stat_get_snapshot_timestamp() to show statistics snapshot timestamp. Per discussion, this could be useful for purposes such as programmatically detecting a nonresponding stats collector. We already have the timestamp anyway, it's just a matter of providing a SQL-accessible function to fetch it. Matt Kelly, reviewed by Jim Nasby
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/monitoring.sgml | modified | +8 −0 |
| src/backend/utils/adt/pgstatfuncs.c | modified | +8 −0 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.h | modified | +2 −0 |
| src/test/regress/expected/stats.out | modified | +9 −1 |
| src/test/regress/sql/stats.sql | modified | +5 −1 |