Re: selective statement logging

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Postgresql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: selective statement logging
Date: 2004-03-10 19:24:18
Message-ID: 200403101924.i2AJOI314772@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan wrote:
>
> The TODO list contains this item which I said I would look at:
>
> Allow logging of only data definition(DDL), or DDL and modification
> statements
>
> The trouble I see is that we currently do statement logging before we
> have examined the query string at all, in the code shown below from
> src/backend/tcop/postgres.c.
>
> I guess I could construct one or more regexes to examine the query
> string, although that might affect performance a bit (of course, I would
> precompile the patterns).
>
> Any other ideas on how to proceed?

Yes, look at how the command tag is grabbed for the PS display, and do
the log checks at that point.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2004-03-10 19:25:07 Default Stats Revisited
Previous Message Bruce Momjian 2004-03-10 19:18:17 Re: Timing of 'SELECT 1'