Logging all the queries in postgres I am using Postgres as my Database. I need to know whether I can extract all the queries that got executed with out logging them as logging all the queries will degrade the performance of database. So, provide a way I can get all the queries that got executed with out logging the queries.
You can try by capturing the traffic with tshark and some filters :
https://www.wireshark.org/docs/dfref/p/pgsql.html

It will not be very proper but should work.