dumptest=# create table t1(id serial primary key, data text);
CREATE TABLE
dumptest=# insert into t1(data) values('a'), ('b'), ('c');
INSERT 0 3
dumptest=# create table t2(id serial primary key, data char(1800));
CREATE TABLE
dumptest=# insert into t2(data) select i from generate_series(1,30) g(i);
INSERT 0 30
dumptest=# select ctid from t2;
 ctid  
-------
 (0,1)
 (0,2)
 (0,3)
 (0,4)
 (1,1)
 (1,2)
 (1,3)
 (1,4)
 (2,1)
 (2,2)
 (2,3)
 (2,4)
 (3,1)
 (3,2)
 (3,3)
 (3,4)
 (4,1)
 (4,2)
 (4,3)
 (4,4)
 (5,1)
 (5,2)
 (5,3)
 (5,4)
 (6,1)
 (6,2)
 (6,3)
 (6,4)
 (7,1)
 (7,2)
(30 rows)


----------------------------
hannuk@hannuk007:~/work5/postgres-git/src/bin/pg_dump$ ./pg_dump -h /var/run/postgresql -p 5432 --format=directory --huge-table-chunk-pages=2 -f ../dumptest dumptest
pg_dump: warning: CHUNKING: set dopt.huge_table_chunk_pages to [2]
pg_dump: warning: CHUNKING: toc for simple relpages [1]
pg_dump: warning: CHUNKING: toc for chunked relpages [8]
pg_dump: warning: CHUNKING: toc for pages [0:1]
pg_dump: warning: CHUNKING: toc for pages [2:3]
pg_dump: warning: CHUNKING: toc for pages [4:5]
pg_dump: warning: CHUNKING: toc for pages [6:7]
pg_dump: warning: CHUNKING: data query: COPY public.t1 (id, data) TO stdout;
pg_dump: warning: CHUNKING: pages [0:1]
pg_dump: warning: CHUNKING: data query: COPY (SELECT id, data FROM public.t2  WHERE  ctid BETWEEN '(0,1)' AND '(1,32000)') TO stdout;
pg_dump: warning: CHUNKING: pages [2:3]
pg_dump: warning: CHUNKING: data query: COPY (SELECT id, data FROM public.t2  WHERE  ctid BETWEEN '(2,1)' AND '(3,32000)') TO stdout;
pg_dump: warning: CHUNKING: pages [4:5]
pg_dump: warning: CHUNKING: data query: COPY (SELECT id, data FROM public.t2  WHERE  ctid BETWEEN '(4,1)' AND '(5,32000)') TO stdout;
pg_dump: warning: CHUNKING: pages [6:4294967295]
pg_dump: warning: CHUNKING: data query: COPY (SELECT id, data FROM public.t2  WHERE  ctid BETWEEN '(6,1)' AND '(4294967295,32000)') TO stdout;

hannuk@hannuk007:~/work5/postgres-git/src/bin/pg_dump$ ls -l ../dumptest/
total 28
-rw-r--r-- 1 hannuk primarygroup   37 Nov 11 15:28 4012.dat.gz
-rw-r--r-- 1 hannuk primarygroup  100 Nov 11 15:28 4021.dat.gz
-rw-r--r-- 1 hannuk primarygroup  108 Nov 11 15:28 4022.dat.gz
-rw-r--r-- 1 hannuk primarygroup  110 Nov 11 15:28 4023.dat.gz
-rw-r--r-- 1 hannuk primarygroup   94 Nov 11 15:28 4024.dat.gz
-rw-r--r-- 1 hannuk primarygroup 4790 Nov 11 15:28 toc.dat

hannuk@hannuk007:~/work5/postgres-git/src/bin/pg_dump$ ./pg_restore --list ../dumptest
;
; Archive created at 2025-11-11 15:28:40 CET
;     dbname: dumptest
;     TOC Entries: 21
;     Compression: gzip
;     Dump Version: 1.16-0
;     Format: DIRECTORY
;     Integer: 4 bytes
;     Offset: 8 bytes
;     Dumped from database version: 16.4 (Debian 16.4-3+build4)
;     Dumped by pg_dump version: 19devel
;
;
; Selected TOC Entries:
;
218; 1259 1255969 TABLE public t1 hannuk
217; 1259 1255968 SEQUENCE public t1_id_seq hannuk
4019; 0 0 SEQUENCE OWNED BY public t1_id_seq hannuk
216; 1259 1255960 TABLE public t2 hannuk
215; 1259 1255959 SEQUENCE public t2_id_seq hannuk
4020; 0 0 SEQUENCE OWNED BY public t2_id_seq hannuk
3861; 2604 1255972 DEFAULT public t1 id hannuk
3860; 2604 1255963 DEFAULT public t2 id hannuk
4012; 0 1255969 TABLE DATA public t1 hannuk
4021; 0 1255960 TABLE DATA (pages 0:1) public t2 hannuk
4022; 0 1255960 TABLE DATA (pages 2:3) public t2 hannuk
4023; 0 1255960 TABLE DATA (pages 4:5) public t2 hannuk
4024; 0 1255960 TABLE DATA (pages 6:4294967295) public t2 hannuk
4025; 0 0 SEQUENCE SET public t1_id_seq hannuk
4026; 0 0 SEQUENCE SET public t2_id_seq hannuk
3865; 2606 1255976 CONSTRAINT public t1 t1_pkey hannuk
3863; 2606 1255967 CONSTRAINT public t2 t2_pkey hannuk

hannuk@hannuk007:~/work5/postgres-git/src/bin/pg_dump$ ./pg_restore ../dumptest -f ../dumptest/dump.sql

