Re: filter statements in logs

Lists: pgsql-general
From: "Jaime Casanova" <jcasanov(at)systemguards(dot)com(dot)ec>
To: "Postgres general mailing list" <pgsql-general(at)postgresql(dot)org>
Subject: filter statements in logs
Date: 2008-11-24 16:43:41
Message-ID: 3073cc9b0811240843i12c0a8a0g881f4201fd4a5b99@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi,

A client has a web system that uses ADODB for php, and that driver is
executing "select version()", "SET DATESTYLE TO 'ISO'" and at least
one or two more statements a *lot* of times (almost 1000000 times in 3
hours, and this is just "select version()"), i tried to understand why
but it seems it is for knowing the correct way of looking in catalogs.

But this is just noise in the logs. And when i try to use pgFouine to
analyze logs it shouts because of the size of them, almost 450Mb in a
few hours.

My question: is there a way to avoid logging some predefined statements?

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157


From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Jaime Casanova" <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: "Postgres general mailing list" <pgsql-general(at)postgresql(dot)org>
Subject: Re: filter statements in logs
Date: 2008-11-24 17:04:55
Message-ID: dcc563d10811240904k1d7d3129t8e8dc3f18c60ab34@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, Nov 24, 2008 at 9:43 AM, Jaime Casanova
<jcasanov(at)systemguards(dot)com(dot)ec> wrote:
> Hi,
>
> A client has a web system that uses ADODB for php, and that driver is
> executing "select version()", "SET DATESTYLE TO 'ISO'" and at least
> one or two more statements a *lot* of times (almost 1000000 times in 3
> hours, and this is just "select version()"), i tried to understand why
> but it seems it is for knowing the correct way of looking in catalogs.
>
> But this is just noise in the logs. And when i try to use pgFouine to
> analyze logs it shouts because of the size of them, almost 450Mb in a
> few hours.
>
> My question: is there a way to avoid logging some predefined statements?

The only way I can think of is to use apache's log rotator and when
you setup the rotation do something like:

postgres -D ... | grep -v "things I don't wanna see no more"| grep -v
"another thing I don't wanna see no more"| rotatelogs filename 86400


From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
Cc: "Jaime Casanova" <jcasanov(at)systemguards(dot)com(dot)ec>, "Postgres general mailing list" <pgsql-general(at)postgresql(dot)org>
Subject: Re: filter statements in logs
Date: 2008-11-24 17:13:56
Message-ID: 2f4958ff0811240913s3cf09d76p37f5f4c766cce78@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, Nov 24, 2008 at 5:04 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>wrote:

> postgres -D ... | grep -v "things I don't wanna see no more"| grep -v
> "another thing I don't wanna see no more"| rotatelogs filename 86400
>
or:

grep -Ev "I don't wanna see you no more|and you too|and your cat too"

;)

--
GJ