I Have problem with "postmaster" processes which unexpectedly consume very big amount of memory, about 200MB!!!, and as a consequence whole available memory in Linux, and as a consequence Linux kills postmasters processes :(
After an investigation, I suspect, than some of my queries which contains many INNER JOIN's (about 30, and one of them about 60) probably causes memory problem.
What are postgres limitations about JOINS in one query? How can I estimate memory needed for postgres?
Using EXPLAIN ANALYZE BUFFERS
How can I protect my postgres server, when i don't know exactly how complicated queries creates my customer, e.g. in reports?
Using pgbadger/pgfounie tools, you will get the detailed statistical report.