CREATE EXTENSION pg_stat_statements;

\timing

begin;

--DROP TABLE large_test;
CREATE TABLE large_test (num1 bigint, num2 double precision, num3 double precision);

-- generate test data
-- COPY (SELECT round(random()*100), random(), random()*142         
--      FROM generate_series(1, 40000000) s(i))                         
--       TO '/home/anastasia/original_repo/large_test.csv'                                                                                                                                                                                        WITH (format 'csv', escape '"', delimiter ',', quote '"');

COPY large_test FROM '/home/anastasia/original_repo/large_test.csv' WITH (format 'csv', escape '"', delimiter ',', quote '"', FREEZE);
COPY large_test FROM '/home/anastasia/original_repo/large_test.csv' WITH (format 'csv', escape '"', delimiter ',', quote '"', FREEZE) ;
COPY large_test FROM '/home/anastasia/original_repo/large_test.csv' WITH (format 'csv', escape '"', delimiter ',', quote '"', FREEZE) ;

commit;

\d+

VACUUM large_test;

SELECT query, wal_records, wal_bytes, pg_size_pretty(wal_bytes) as wal_bytes_pretty
   FROM pg_stat_statements where query like 'VACUUM%' OR query like 'COPY%';

