 DROP TABLE foo;
 CREATE TABLE foo (x integer);
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p1';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p2';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p3';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p4';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p5';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p6';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p7';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p8';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p9';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p10';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p11';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p12';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p13';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p14';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p15';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p16';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p17';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p18';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p19';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p20';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p21';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p22';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p23';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p24';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p25';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p26';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p27';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p28';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p29';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p30';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p31';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p32';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p33';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p34';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p35';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p36';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p37';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p38';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p39';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p40';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p41';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p42';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p43';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p44';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p45';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p46';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p47';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p48';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p49';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p50';
 BEGIN; SELECT txid_current();
 INSERT INTO foo SELECT generate_series(1,100000)::integer;
 PREPARE TRANSACTION 'p51';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p52';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p53';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p54';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p55';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p56';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p57';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p58';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p59';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p60';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p61';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p62';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p63';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p64';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p65';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p66';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p67';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p68';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p69';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p70';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p71';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p72';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p73';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p74';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p75';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p76';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p77';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p78';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p79';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p80';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p81';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p82';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p83';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p84';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p85';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p86';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p87';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p88';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p89';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p90';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p91';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p92';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p93';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p94';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p95';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p96';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p97';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p98';
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p99';
 BEGIN; SELECT txid_current(); COMMIT;
 BEGIN; SELECT txid_current(); PREPARE TRANSACTION 'p100';
