Thanks for your response!
> Sorry, there's basically 0 chance of that happening with any
> reliability. The stats system is designed not to slow down actual
> transactions at all, which is what it would have to do to guarantee
> instantaneous response.
Is there a way that I can manually slow down a query or transaction, to
ensure that I see it when I type 'SELECT current_query FROM
pg_stat_activity;'. I already tried explicitly ending transactions by
BEGIN; SELECT current_query FROM pg_stat_activity; COMMIT;
BEGIN; COMMIT; SELECT current_query FROM pg_stat_activity;
but that didn't seem to help. Is there a kindof sleep command that I can
use to turn this particular query into a 'long' query, that will register
instantaneously as the current_query? (This is assuming that the database
is relatively empty, so I can't create a normal query that will take that
> You could improve the reaction time by reducing PGSTAT_STAT_INTERVAL
> in the source code (see backend/postmaster/pgstat.c),
Would this have a different effect than typing:
\set pgstat_stat_interval 0
at the command prompt in the pgSQL client itself?
> but you'll incur corresponding increases in overhead, and you'll never
> get to the point of certain repeatability.
I don't care at all about increases in overhead. I warned you that my
request is a strange one, but this is more of a puzzle, that happens to
have a real use for me. It also doesn't have to be 100% repeatable. 50%
or even 25% repeatable would be good enough for me, as long as it works a
significant percentage of the time.
In response to
pgsql-novice by date
|Next:||From: operationsengineer1||Date: 2005-10-22 19:25:36|
|Subject: Excellent PGSQL Tutorial, WinXP as Service - Configure for Manual Operation|
|Previous:||From: Tom Lane||Date: 2005-10-22 02:58:45|
|Subject: Re: Displaying current query - eliminating <IDLE> |