DROP TABLE IF EXISTS toasted_key;
CREATE TABLE toasted_key (
    id serial,
    toasted_key text PRIMARY KEY,
    toasted_col1 text,
    toasted_col2 text
);
--ALTER TABLE toasted_key ALTER COLUMN toasted_key SET STORAGE EXTERNAL;
--ALTER TABLE toasted_key ALTER COLUMN toasted_col1 SET STORAGE EXTERNAL;

SELECT pg_drop_replication_slot(slot_name) FROM pg_replication_slots WHERE slot_name = 'test_slot';
SELECT 'init' FROM pg_create_logical_replication_slot('test_slot', 'test_decoding');

INSERT INTO toasted_key(toasted_key, toasted_col1) VALUES(repeat('1234567890', 500), repeat('9876543210', 500));
UPDATE toasted_key SET toasted_col2 = toasted_col1;

SELECT pg_logical_slot_peek_changes('test_slot', NULL, NULL);
