Craig Warren
Craig Warren

Reputation: 1665

Postgres Query Logging for Windows

I have an application which is based on a Postgres database and I need to be able to examine the requests the application sends of the database.

I want to have Postgres log all of the queries it receives somewhere that I can examine them in order to rebuild some of its functionality in another application.

Can someone recommend a simple way to logging the queries Postgres receives in a Windows operating system?

Thanks, Craig

Upvotes: 12

Views: 5710

Answers (1)

user80168
user80168

Reputation:

Edit your postgresql.conf for PostgreSQL server, and either change log_statement to 'all' or change log_min_duration_statement to 0.

After the change you have to reload PostgreSQL configuration, and the queries will be logged to PostgreSQL log.

Upvotes: 10

Related Questions