create table if not exists test (a int);
select pg_create_logical_replication_slot('s', 'test_decoding');
insert into test select generate_series(1, 8000000);
set logical_decoding_work_mem to '5GB'; -- '32MB' to invoke eviction.
select from pg_logical_slot_peek_changes('s', null, null);
select from pg_logical_slot_peek_changes('s', null, null);
select from pg_logical_slot_peek_changes('s', null, null);
