OSDN Git Service

Turn PGBE_ACTIVITY_SIZE into a GUC variable, track_activity_query_size.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 30 Jun 2008 10:58:47 +0000 (10:58 +0000)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 30 Jun 2008 10:58:47 +0000 (10:58 +0000)
commit995fb7420268c2457c9a64f41394cea54316365f
treed8de58e9497f15da810d19c71a18f8fe6692b060
parent7ea9b997ef07672d45278ab1c5b0634eaa090966
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