Re: slow commits with heavy temp table usage in 8.4.0

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Todd A(dot) Cook" <tcook(at)blackducksoftware(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: slow commits with heavy temp table usage in 8.4.0
Date: 2009-08-05 20:29:21
Message-ID: 4A79A551020000250002947C@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Todd A. Cook" <tcook(at)blackducksoftware(dot)com> writes:
>> I've noticed that on 8.4.0, commits can take a long time when a
>> temp table is repeatedly filled and truncated within a loop.

> The commit time doesn't seem tremendously out of line, but it looks
> like there's something O(N^2)-ish in the function execution. Do
> you see a similar pattern? With so many temp files there could well
> be some blame on the kernel side. (This is a Fedora 10 box.)

This sounds very similar to my experience here:

http://archives.postgresql.org/pgsql-hackers/2008-11/msg01472.php

Depending on what sort of RAID controller caching is present, a BBU
cache might be containing the problem up to some threshold. Perhaps
it's not so much O(N^2) as O(N)-<someconstant>, with a min of zero?

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2009-08-05 20:30:18 Re: Alpha Releases: Docs?
Previous Message Pavel Stehule 2009-08-05 20:04:49 Re: GRANT ON ALL IN schema