1

Is query tracing on Postgresql possible? I am using 9.0 on windows with OLEDB interface.

Also, I need it to be in real-time, not buffered like it is by default...

1 Answer 1

2

I assume you mean tracing the statements on the server side?

In that case, change the parameter log_min_duration to 0 in postgresql.conf.

You don't need to restart the server, just reload the configuration (pg_ctl reload)

Sign up to request clarification or add additional context in comments.

3 Comments

i found the config options and now I have the log - however - it is lagging behind i.e. isn't flushed regularly. is there any option to enable real-time log flushing so I can tail it?
Sorry, I don't know how to control this
On Second thought, you might be able to get something out of pg_catalog.pg_stat_activity, but it doesn't keep a history of statements, only the currently executed ones

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.