From: Artiom Makarov <artiom.makarov@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: temp table "on commit delete rows": transaction overhead
Date: Wed, 31 Mar 2010 11:42:29 +0400
Message-ID: <w2ud448ea361003310042t91d5f283pb3daccbe19dfcb7@mail.gmail.com> (raw)
In-Reply-To: <26236.1269971456@sss.pgh.pa.us>
References: <d448ea361003300446s3f750d2fj294093419699cb36@mail.gmail.com>
<26236.1269971456@sss.pgh.pa.us>
2010/3/30 Tom Lane <tgl@sss.pgh.pa.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()
<CUT>
case ONCOMMIT_DELETE_ROWS:
oids_to_truncate = lappend_oid(oids_to_truncate, oc->relid);
break;
<CUT>
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?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: artiom.makarov@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: temp table "on commit delete rows": transaction overhead
In-Reply-To: <w2ud448ea361003310042t91d5f283pb3daccbe19dfcb7@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox