On Sat, Sep 18, 2004 at 03:41:24PM -0400, Tom Lane wrote:
> >> No, stats_command_string need not be set, only stats_start_collector.
>
> > BTW, I've got this set (I'm even running as "postgres") but still I get
> > the "<command string not enabled>" message instead of current_query. :(
>
> It has to be set in the backend you want the info from ...
I set it in /etc/postgresql/postgresql.conf; then I restarted the postmaster
just to be sure, and checked from psql. Same message, even about the same
session:
jtv@bulletproof:~$ sudo su postgres -c 'postgresql-8.0/bin/psql template1'
Password:
Welcome to psql 8.0.0beta1, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g
orterminate with semicolon to execute query \q to quit
template1=# select * from pg_stat_activity;datid | datname | procpid | usesysid | usename | current_query
| query_start
-------+-----------+---------+----------+----------+------------------------------+------------- 1 | template1 |
11559| 1 | postgres | <command string not enabled> |
(1 row)
template1=# show stats_start_collector;stats_start_collector
-----------------------on
(1 row)
Jeroen