Skip site navigation (1) Skip section navigation (2)

Exec statement logging

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Exec statement logging
Date: 2005-04-11 21:41:05
Message-ID: 1113255665.16721.1270.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-patches
Following patch is a minor addition to postgres.c that allows the two
existing statement logging techniques to work with V3 exec. This then
allows statement logging with PostgreSQL 8.0+ for JDBC and other V3
connection types.

The rationale of this patch is to add functionality without modifying
existing behaviour. There is expected to be some difficulty with
log_statement producing a log line at both parse and exec, but some may
find that useful. Since there are two ways of producing statement
logging with duration times, setting log_min_duration_statement=0 will
avoid the logging of statements for both parse and exec. For many this
method is already the preferred way of logging statement performance
stats.

There is no attempt to log parameters, since these are not often
required for performance analysis.

The enclosed patch has been tested against cvstip.

I also see this as a backpatch onto 8.0, since it prevents statements
from being logged as described in the manual and prevents effective
performance tuning. It has not been tested against 8.0.2, though was
originally written against 8.0.1 and is believed to apply cleanly.

Some code has been duplicated with this patch; refactoring and cleanup
can be performed should anybody desire it.

The patch was produced quickly to assist tuning efforts during
Scalability & Performance benchmarking of PostgreSQL 8.0 carried out at
Unisys Corporation's Mission Viejo engineering laboratory. The
development was sponsored by Unisys Corporation and the patch has now
been donated to the PostgreSQL community under the standard
PostgreSQL/BSD licence. Approval for release of this code has been given
in writing to me by the Director, Open Runtime Products, Unisys on April
8, 2005.

Best Regards, Simon Riggs


Attachment: execlog.patch
Description: text/x-patch (3.8 KB)

Responses

pgsql-patches by date

Next:From: Simon RiggsDate: 2005-04-11 23:24:05
Subject: OS Locale UTF-8
Previous:From: Tom LaneDate: 2005-04-11 20:31:41
Subject: Re: NetBSD mac68k crashing on union regression test

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group