commit 6cf12211a62de32762e173f74a4e09cfe9b2d842 Author: Amul Sul Date: Thu Dec 18 11:09:44 2025 +0530 WIP2 diff --git a/src/bin/pg_combinebackup/t/002_compare_backups.pl b/src/bin/pg_combinebackup/t/002_compare_backups.pl index a3e29c05509..d539a0ca511 100644 --- a/src/bin/pg_combinebackup/t/002_compare_backups.pl +++ b/src/bin/pg_combinebackup/t/002_compare_backups.pl @@ -45,6 +45,17 @@ CREATE TABLE will_change_in_ts (a int, b text) TABLESPACE ts1; INSERT INTO will_change_in_ts VALUES (1, 'initial test row'); CREATE TABLE will_get_dropped_in_ts (a int, b text); INSERT INTO will_get_dropped_in_ts VALUES (1, 'initial test row'); +-- +-- Create a table with minimal fillfactor to minimize tuples per page. +-- STORAGE PLAIN prevents compression and TOASTing of repetitive data, +-- ensuring predictable row sizes that target 1 row per page. +-- At 8KB page size, 135k pages forces the relation to exceed 1GB, +-- ensuring it spans at least two physical storage segments. +-- +CREATE TABLE big_tab (a int, b text) WITH (FILLFACTOR = 10); +INSERT INTO big_tab SELECT i, repeat('x1234567890x0987654321x', 20) +FROM generate_series(1, 135000) i; +VACUUM big_tab; EOM # Read list of tablespace OIDs. There should be just one. @@ -83,6 +94,12 @@ INSERT INTO newly_created_in_ts VALUES (1, 'row for new table'); VACUUM FULL will_get_rewritten; DROP DATABASE db_will_get_dropped; CREATE DATABASE db_newly_created; +-- +-- Delete rows at the logical end of the table. This creates removable empty +-- pages at the tail +-- +DELETE FROM big_tab WHERE a > 134900; +VACUUM (TRUNCATE) big_tab; EOM # Take an incremental backup.