Erik Wasser <erik(dot)wasser(at)iquer(dot)net> writes:
> But 'current_query' is still always empty... B-(
The pg_stats views lag reality by a certain amount, so checking for your
own query is generally not gonna work. Try starting a long-running
query in another session.
regards, tom lane