Re: temp table "on commit delete rows": transaction overhead

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Artiom Makarov <artiom(dot)makarov(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: temp table "on commit delete rows": transaction overhead
Date: 2010-04-01 00:44:25
Message-ID: 201004010044.o310iPU08826@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Tom Lane wrote:
> Artiom Makarov <artiom(dot)makarov(at)gmail(dot)com> writes:
> > When temp tables with "on commit delete rows" exists, I can see a
> > strange delay at any begin and commit.
>
> A delay at commit is hardly surprising, because each such temp table
> requires filesystem operations at commit (basically an "ftruncate").
> I don't recall any operations at transaction start for such tables,
> but there may be some.

I think one of the problems is that we do the truncate even if the table
has not be touched by the query, which is poor behavior.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Craig Ringer 2010-04-01 03:11:36 Re: How to fast the REINDEX
Previous Message raghavendra t 2010-03-31 22:57:13 Re: How to fast the REINDEX