On Thu, Jan 26, 2006 at 10:13:52AM -0500, John D. Burger wrote: > I suspect that if a transaction rolls back, any inserts done in the > interim turn into dead tuples. Yep: test=> CREATE TABLE foo (x integer); CREATE TABLE test=> BEGIN; INSERT INTO foo SELECT 1 FROM generate_series(1, 10000); ROLLBACK; BEGIN INSERT 0 10000 ROLLBACK test=> INSERT INTO foo SELECT 1 FROM generate_series(1, 20000); INSERT 0 20000 test=> \x Expanded display is on. test=> SELECT * FROM pgstattuple('foo'); -[ RECORD 1 ]------+-------- table_len | 1089536 tuple_count | 20000 tuple_len | 640000 tuple_percent | 58.74 dead_tuple_count | 10000 dead_tuple_len | 320000 dead_tuple_percent | 29.37 free_space | 6872 free_percent | 0.63 test=> VACUUM foo; VACUUM test=> SELECT * FROM pgstattuple('foo'); -[ RECORD 1 ]------+-------- table_len | 1089536 tuple_count | 20000 tuple_len | 640000 tuple_percent | 58.74 dead_tuple_count | 0 dead_tuple_len | 0 dead_tuple_percent | 0 free_space | 326692 free_percent | 29.98 -- Michael Fuhr