From: Tom Lane <tgl@sss.pgh.pa.us>
To: Veikko Mäkinen <veikko.makinen@ecom.fi>
Cc: pgsql-performance@postgresql.org
Subject: Re: How does the transaction buffer work?
Date: Fri, 17 Jun 2005 00:08:09 -0400
Message-ID: <15555.1118981289@sss.pgh.pa.us> (raw)
In-Reply-To: <42B1D2DE.4020709@ecom.fi>
References: <42B1D2DE.4020709@ecom.fi>
=?ISO-8859-1?Q?Veikko_M=E4kinen?= <veikko.makinen@ecom.fi> writes:
> How does Postgres (8.0.x) buffer changes to a database within a
> transaction? I need to insert/update more than a thousand rows (mayde
> even more than 10000 rows, ~100 bytes/row) in a table but the changes
> must not be visible to other users/transactions before every row is
> updated.
There were some other responses already, but I wanted to add this:
there isn't any "transaction buffer" in Postgres. The above scenario
won't cause us any noticeable problem, because what we do is mark
each row with its originating transaction ID, and then readers compare
that to the set of transaction IDs that they think are "in the past".
The number of rows affected by a transaction is not really a factor
at all.
Now of course this isn't Nirvana, you must pay somewhere ;-) and our
weak spot is the need for VACUUM. But you have no need to fear large
individual transactions.
regards, tom lane
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: tgl@sss.pgh.pa.us, veikko.makinen@ecom.fi
Subject: Re: How does the transaction buffer work?
In-Reply-To: <15555.1118981289@sss.pgh.pa.us>
* 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