Turn PGBE_ACTIVITY_SIZE into a GUC variable, track_activity_query_size.
authorHeikki Linnakangas <heikki@enterprisedb.com>
Mon, 30 Jun 2008 10:58:47 +0000 (10:58 +0000)
committerHeikki Linnakangas <heikki@enterprisedb.com>
Mon, 30 Jun 2008 10:58:47 +0000 (10:58 +0000)
commit13928f0e4ccea0d3a5e6aafa2a7f3e4e2142df9b
tree94709233295e1b8a18f99a19459156cea9c3ae03
parentc82d141c6f1101719945e96206e0b5a65649202a
Turn PGBE_ACTIVITY_SIZE into a GUC variable, track_activity_query_size.

As the buffer could now be a lot larger than before, and copying it could
thus be a lot more expensive than before, use strcpy instead of memcpy to
copy the query string, as was already suggested in comments. Also, only copy
the PgBackendStatus struct and string if the slot is in use.

Patch by Thomas Lee, with some changes by me.
doc/src/sgml/config.sgml
src/backend/postmaster/pgstat.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/pgstat.h