i = 1 print "set search_path = mytest, public;" print "drop table if exists foo;" print "create table foo (i int unique);" while 1: print "INSERT INTO foo select generate_series(%d, %d);" % (i, i + 99999) print "DELETE FROM foo WHERE i < %d;" % (i) print "VACUUM foo;" i += 100000