set log_min_duration_statement = 300,000
(300,000 ms = 5min)
From the docs:
log_min_duration_statement (integer)
Causes the duration of each completed statement to be logged if the
statement ran for at least the specified number of milliseconds. Setting
this to zero prints all statement d
On 01/06/2017 12:24 PM, Ivan Voras wrote:
Hello,
I'm investigating options for an environment which has about a dozen
servers and several dozen databases on each, and they occasionally
need to run huge reports which slow down other services. This is of
course "legacy code". After some discu
Possibly some buffer caching is happening, what happens if you then
remove the added index and run the query again?
On 12/27/2016 10:38 AM, Valerii Valeev wrote:
Thank you David,
I used same rationale to convince my colleague — it didn’t work :)
Sort of “pragmatic” person who does what seems
Something like this in a bash script?
#!/bin/bash
echo "select schemaname, tablename from pg_tables where tablename not in
(your list of excluded tables) and schemaname not in
('information_schema', 'pg_catalog')" | psql -t > /tmp/tablist
exec < /tmp/tablist
while read line
do
set - $l
Hi All;
We have a client running on VMware, they have heavy write traffic and we
want to isolate the IO for the tx logs (pg_xlog). However it seems the
best plan based on feedback from the client is either
(a) simply leave the pg_xlog dir in the VMDK
or
(b) relocate pg_xlog to NAS/NFS
I'