\pset pager off                                                                                               
select pg_sleep(1);                                                                                           CREATE TABLE pgbench_accounts_1 (CHECK (bid % 2 = 0)) INHERITS                                                (pgbench_accounts);                                                                                           select pg_sleep(1);                                                                                           
CREATE TABLE pgbench_accounts_2 (CHECK (bid % 2 = 1)) INHERITS                                                
(pgbench_accounts);                                                                                           
select pg_sleep(1);                                                                                           
WITH del AS (DELETE FROM pgbench_accounts WHERE bid % 2 = 0 RETURNING                                         
*) INSERT INTO pgbench_accounts_1 SELECT * FROM del;                                                          
select pg_sleep(1);                                                                                           
WITH del AS (DELETE FROM pgbench_accounts WHERE bid % 2 = 1 RETURNING                                         
*) INSERT INTO pgbench_accounts_2 SELECT * FROM del;                                                          
select pg_sleep(1);                                                                                           
VACUUM ANALYSE;                                                                                               
select pg_sleep(3);                                                                                           
EXPLAIN ANALYSE SELECT count(*) FROM pgbench_accounts;                                                        
-- hop
CHECKPOINT;
