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

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

From: Artiom Makarov <artiom(dot)makarov(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: temp table "on commit delete rows": transaction overhead
Date: 2010-03-31 07:42:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
2010/3/30 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> I don't recall any operations at transaction start for such tables,
> but there may be some.
Both in –°ommitTransaction(void) and  PrepareTransaction(void) we can
see PreCommit_on_commit_actions() call;

Here PreCommit_on_commit_actions()
				oids_to_truncate = lappend_oid(oids_to_truncate, oc->relid);

As a my opinion, the same action taked place at transaction start and commit.

To truncate rows of any temp tables, both  changed and unchanged(!)
after transaction looks as little reinsurance. Well.
But why do the same action _before_ any transaction?

In response to

pgsql-performance by date

Next:From: Matthew WakelingDate: 2010-03-31 09:29:58
Subject: Re: experiments in query optimization
Previous:From: David WilsonDate: 2010-03-31 04:37:40
Subject: Re: query has huge variance in execution times

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