-- VACUUM seals an open write buffer that holds a quarter of a unit of rows even when its pages are far under a quarter of write_buffer_limit (a column of one small integer is a few -- bytes a row): the rows leave the buffer, which every probe reads row by row, for a segment. Fewer rows stay where they are. CREATE EXTENSION pg_sift; CREATE TABLE sr (k int) WITH (autovacuum_enabled = off); CREATE INDEX sr_idx ON sr USING sift_col (k) WITH (write_buffer_limit = 65536); NOTICE: sift_col index "sr_idx": 1 advice (track_changes) DETAIL: advice: track_changes = the table has no one-column primary key HINT: Reasons, costs and how to turn each off: SELECT * FROM sift.index_choices('sr_idx'); CREATE FUNCTION buffered(t regclass) RETURNS bigint LANGUAGE sql AS $$ SELECT coalesce(sum(rows), 0) FROM sift.col_segments(t) WHERE kind <> 'immutable' $$; INSERT INTO sr SELECT g % 100 FROM generate_series(1, 5000) g; VACUUM sr; SELECT buffered('sr_idx') AS few_rows_stay; few_rows_stay --------------- 5000 (1 row) INSERT INTO sr SELECT g % 100 FROM generate_series(1, 20000) g; VACUUM sr; SELECT buffered('sr_idx') AS many_rows_sealed; many_rows_sealed ------------------ 0 (1 row) SELECT count(*) FROM sr WHERE k = 7; count ------- 250 (1 row) DROP TABLE sr; DROP FUNCTION buffered(regclass); DROP EXTENSION pg_sift;