From: | Greg Smith <gsmith(at)gregsmith(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCHES] WIP patch - INSERT-able log statements |
Date: | 2007-02-20 13:16:51 |
Message-ID: | Pine.GSO.4.64.0702200747340.10447@westnet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On Tue, 20 Feb 2007, Tom Lane wrote:
> I can't believe that any production situation could tolerate the
> overhead of one-commit-per-log-line.
There aren't that many log lines, and a production environment with lots
of commit throughput won't even notice. The installation I work on tuning
does 300 small commits per second on a bad day. I can barely measure the
overhead of whether or not the log files are involved in that if I'm
importing them at the same time. The situation obviously changes if
you're logging per-query level detail.
> So a realistic tool for this is going to have to be able to wrap blocks
> of maybe 100 or 1000 or so log lines with BEGIN/COMMIT, and that is
> exactly as difficult as wrapping them with a COPY command. Thus, I
> disbelieve your argument. We should not be designing this around an
> assumed use-case that will only work for toy installations.
Wrapping the commits in blocks to lower overhead is appropriate for toy
installations, and probably medium sized ones too. Serious installations,
with battery-backed cache writes and similar commit throughput enhancing
hardware, can commit a low-volume stream like the logs whenever they
please. That's the environment my use-case comes from.
Anyway, it doesn't really matter; I can build a tool with COPY style
output as well, it just won't be trivial like the INSERT one would be.
My reasons for "would slightly prefer INSERT" clearly aren't strong enough
to override the issues you bring up with the average case.
--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2007-02-20 13:53:40 | Re: Plan invalidation design |
Previous Message | Andrew Dunstan | 2007-02-20 12:42:52 | Re: New feature request: FlashBack Query |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-02-20 14:23:13 | Re: [HACKERS] HOT WIP Patch - version 2 |
Previous Message | Pavel Stehule | 2007-02-20 12:27:42 | correct format for date, time, timestamp for XML functionality |