Skip to content

pg_pagecopy

Physical table transfer and local page cloning with compatibility checks.

pg_pagecopy · Physical table transfer and local page cloning with compatibility checks.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
102322pg_pagecopypg_pagecopy0.0.1ETLMITRust

PostgreSQL · 13, 14, 15, 16, 17, 18

Usage

Sources:

pg_pagecopy 0.0.1 transfers table pages between compatible PostgreSQL instances or clones a table locally.

Core Workflow

pagecopy.pull connects to a source database and transfers a specified relation. pagecopy.clone stays within one database; pagecopy.check reports eligibility. Missing destinations can be created from the source schema, while existing destinations are overwritten according to the transfer contract.

CREATE EXTENSION pg_pagecopy;
CREATE TABLE pagecopy_source (id integer, payload text);
INSERT INTO pagecopy_source VALUES (1, 'example');
SELECT * FROM pagecopy.check('public.pagecopy_source');
SELECT pagecopy.clone('public.pagecopy_source', 'public.pagecopy_copy');
VACUUM (ANALYZE) public.pagecopy_copy;

Operational Boundaries

Both ends need the extension and superuser authority. Upstream supports PostgreSQL 13–18 for same-major and upward transfers, with compatibility checks; downgrades are rejected. Source freezing and an ACCESS EXCLUSIVE lock can block application work. Only supported relation/index shapes qualify. Protect connection secrets, retain a recoverable copy of the destination and run post-transfer vacuum/analyze.

Table reader