]> granicus.if.org Git - postgresql/commit
Separate state from query string in pg_stat_activity
authorMagnus Hagander <magnus@hagander.net>
Thu, 19 Jan 2012 13:19:20 +0000 (14:19 +0100)
committerMagnus Hagander <magnus@hagander.net>
Thu, 19 Jan 2012 13:19:20 +0000 (14:19 +0100)
commit4f42b546fd87a80be30c53a0f2c897acb826ad52
treee0831a3ac1373da87d1dd7e8c75071448e797141
parentfa352d662e57fa150158b9cb0a8f127250f8c97f
Separate state from query string in pg_stat_activity

This separates the state (running/idle/idleintransaction etc) into
it's own field ("state"), and leaves the query field containing just
query text.

The query text will now mean "current query" when a query is running
and "last query" in other states. Accordingly,the field has been
renamed from current_query to query.

Since backwards compatibility was broken anyway to make that, the procpid
field has also been renamed to pid - along with the same field in
pg_stat_replication for consistency.

Scott Mead and Magnus Hagander, review work from Greg Smith
doc/src/sgml/monitoring.sgml
src/backend/catalog/system_views.sql
src/backend/postmaster/autovacuum.c
src/backend/postmaster/pgstat.c
src/backend/tcop/postgres.c
src/backend/utils/adt/pgstatfuncs.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/pgstat.h
src/test/regress/expected/rules.out