Обсуждение: disabling log_min_duration_statement from pg_dump?
Hi, Every often, i analyze logs to find most slow queries... and every time i found myself trying to ignore pg_dump's generated COPY commands which could be very expensive... can we add a parameter in pg_dump and pg_dumpall to disable log_min_duration_statement? -- Atentamente, Jaime Casanova Soporte y capacitación de PostgreSQL Asesoría y desarrollo de sistemas Guayaquil - Ecuador Cel. +59387171157
Jaime Casanova <jcasanov@systemguards.com.ec> writes: > can we add a parameter in pg_dump and pg_dumpall to disable > log_min_duration_statement? export PGOPTIONS="-c log_min_duration_statement=-1" Or use ALTER USER SET to add that to the options for the account you do pg_dump with; etc etc. regards, tom lane
On Mon, Mar 8, 2010 at 4:25 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Jaime Casanova <jcasanov@systemguards.com.ec> writes: >> can we add a parameter in pg_dump and pg_dumpall to disable >> log_min_duration_statement? > > export PGOPTIONS="-c log_min_duration_statement=-1" > ah! so, that is PGOPTIONS for :) and that works for every libpq application? -- Atentamente, Jaime Casanova Soporte y capacitación de PostgreSQL Asesoría y desarrollo de sistemas Guayaquil - Ecuador Cel. +59387171157
Jaime Casanova wrote: > On Mon, Mar 8, 2010 at 4:25 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Jaime Casanova <jcasanov@systemguards.com.ec> writes: > >> can we add a parameter in pg_dump and pg_dumpall to disable > >> log_min_duration_statement? > > > > export PGOPTIONS="-c log_min_duration_statement=-1" > > > > ah! so, that is PGOPTIONS for :) > and that works for every libpq application? Yes. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com PG East: http://www.enterprisedb.com/community/nav-pg-east-2010.do