LOAD 'online_analyze'; SET online_analyze.enable = on; SET "online_analyze.verbose" = on; SET online_analyze.table_type = "all"; SHOW online_analyze.enable; online_analyze.enable ----------------------- on (1 row) SHOW "online_analyze.verbose"; online_analyze.verbose ------------------------ on (1 row) SHOW online_analyze.table_type; online_analyze.table_type --------------------------- all (1 row) CREATE TABLE oa_tbl( foo int, bar text ); SHOW online_analyze.exclude_tables; online_analyze.exclude_tables ------------------------------- (1 row) SET online_analyze.exclude_tables = "oa_tbl"; SHOW online_analyze.exclude_tables; online_analyze.exclude_tables ------------------------------- public.oa_tbl (1 row) DROP TABLE oa_tbl; SHOW online_analyze.exclude_tables; online_analyze.exclude_tables ------------------------------- (1 row) SET "online_analyze.verbose" = off; CREATE TABLE insert_tbl( foo int, bar text ); CREATE TABLE copy_tbl( foo int, bar text ); INSERT INTO insert_tbl VALUES (1,'a'), (2, 'b'); COPY copy_tbl (foo, bar) FROM stdin; SELECT * FROM copy_tbl; foo | bar -----+----- 1 | a 2 | b (2 rows) -- Both must be completed SELECT stavalues1 FROM pg_statistic WHERE starelid = 'insert_tbl'::regclass; stavalues1 ------------ {1,2} {a,b} (2 rows) SELECT stavalues1 FROM pg_statistic WHERE starelid = 'copy_tbl'::regclass; stavalues1 ------------ {1,2} {a,b} (2 rows) SET online_analyze.table_type = "temporary"; SET online_analyze.min_interval = "10000"; SET online_analyze.scale_factor = "0.1"; SET online_analyze.threshold = "50"; -- Nothing bad should happen in COPY (query) TO file statement COPY ( SELECT 0 AS result ) TO STDOUT WITH DELIMITER ';' CSV; 0 -- Nothing bad should happen in COPY relation TO file statement (copy_tbl does -- not change anyway) COPY copy_tbl TO stdout; 1 a 2 b SELECT stavalues1 FROM pg_statistic WHERE starelid = 'copy_tbl'::regclass; stavalues1 ------------ {1,2} {a,b} (2 rows) SET online_analyze.enable = off;