Transactions, tuples, and VACUUM

From: "Matt Clark" <matt(at)ymogen(dot)net>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Transactions, tuples, and VACUUM
Date: 2003-08-14 10:01:27
Message-ID: OAEAKHEHCMLBLIDGAFELAEKFDGAA.matt@ymogen.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Morning all, bit of a general question here...

consider:

begin;
update a set col1 = 'p' where id = '1';
update a set col2 = 'q' where id = '1';
commit;

versus:

update a set col1 = 'p', col2 = 'q' where id = '1';

Does the first case generate any more dead tuples that will need vacuuming than the second case, or are the two updates 'merged'
when the transaction is committed? Or is the answer 'sometimes' (I would guess depending on checkpoints)?

Cheers

Matt

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-08-14 11:38:55 Re: Transactions, tuples, and VACUUM
Previous Message mathan 2003-08-14 06:12:30 How to test Miscellaneous Functions