{"schema": "pgtrue.report/1", "url": "https://pgtrue.postgres.ai/shared/brief/9f32e744-4150-4ff0-a747-4aea251c27d2", "published": "2026-10-27T03:06:02Z", "publisher": "PostgresAI", "article": {"title": "#PostgresMarathon 2-012: Ultra-fast replica creation with pgBackRest", "url": "https://postgres.ai/blog/20251105-postgres-marathon-2-012-ultra-fast-replica-creation-pgbackrest", "date_published": "2025-11-05T23:59:59Z", "author": "Nikolay Samokhvalov, Maxim Boguk", "publisher": "Postgres.AI Blog"}, "grade": "D+", "axes": [{"axis": "Factual", "summary": "C \u00b7 4 wrong of 14 checked \u00b7 1 caveat \u00b7 partly assessed"}, {"axis": "Applicable", "summary": "A \u00b7 0 wrong of 4 checked \u00b7 0 caveats"}, {"axis": "Consistent", "summary": "A \u00b7 0 wrong of 14 checked \u00b7 2 caveats"}, {"axis": "Transparent", "summary": "C \u00b7 0 wrong of 5 checked \u00b7 0 caveats \u00b7 reproducibility: C (no code)"}, {"axis": "Safe", "summary": "D \u00b7 2 wrong of 22 checked \u00b7 0 caveats \u00b7 1 unwarned risk"}], "findings": [{"anchor": "F3", "url": "https://pgtrue.postgres.ai/shared/brief/9f32e744-4150-4ff0-a747-4aea251c27d2#F3", "claim": "\u2026Testing: no network compression (compress-type=none)\u2026", "title": "compress-type=none leaves network compression enabled", "explanation": "pgBackRest 2.57.0 defaults compress-level-network to 1. With compress-type=none, remote file reads use LZ4 compression. The baseline and explicit --compress-level-network=1 commands select the same network compression level.", "verdict": "False", "sources": [{"url": "https://github.com/pgbackrest/pgbackrest/blob/d9773a31c97077761ee8e7d06e073b0b0734e26f/src/build/config/config.yaml#L813-L817", "label": "pgbackrest@release/2.57.0 \u00b7 src/build/config/config.yaml:813-817"}, {"url": "https://github.com/pgbackrest/pgbackrest/blob/d9773a31c97077761ee8e7d06e073b0b0734e26f/src/storage/remote/read.c#L194-L200", "label": "pgbackrest@release/2.57.0 \u00b7 src/storage/remote/read.c:194-200"}, {"url": "https://github.com/pgbackrest/pgbackrest/blob/d9773a31c97077761ee8e7d06e073b0b0734e26f/src/command/backup/file.c#L180-L181", "label": "pgbackrest@release/2.57.0 \u00b7 src/command/backup/file.c:180-181"}, {"url": "https://github.com/pgbackrest/pgbackrest/blob/d9773a31c97077761ee8e7d06e073b0b0734e26f/src/storage/helper.c#L195-L197", "label": "pgbackrest@release/2.57.0 \u00b7 src/storage/helper.c:195-197"}]}, {"anchor": "F4", "url": "https://pgtrue.postgres.ai/shared/brief/9f32e744-4150-4ff0-a747-4aea251c27d2#F4", "claim": "\u2026Sparse file regions and zero-filled blocks that aren't transmitted\u2026", "title": "Full backups do not omit zero-filled file regions", "explanation": "The full-backup copy writes the first buffer and copies the remaining bytes. It does not omit zero-filled regions. Network LZ4 can reduce their transmitted size. Sparse-region omission does not explain the reported 10.13 GiB/s.", "verdict": "False", "sources": [{"url": "https://github.com/pgbackrest/pgbackrest/blob/d9773a31c97077761ee8e7d06e073b0b0734e26f/src/storage/remote/read.c#L194-L200", "label": "pgbackrest@release/2.57.0 \u00b7 src/storage/remote/read.c:194-200"}, {"url": "https://github.com/pgbackrest/pgbackrest/blob/d9773a31c97077761ee8e7d06e073b0b0734e26f/src/command/backup/file.c#L180-L181", "label": "pgbackrest@release/2.57.0 \u00b7 src/command/backup/file.c:180-181"}, {"url": "https://github.com/pgbackrest/pgbackrest/blob/d9773a31c97077761ee8e7d06e073b0b0734e26f/src/command/backup/file.c#L373-L381", "label": "pgbackrest@release/2.57.0 \u00b7 src/command/backup/file.c:373-381"}]}, {"anchor": "F18", "url": "https://pgtrue.postgres.ai/shared/brief/9f32e744-4150-4ff0-a747-4aea251c27d2#F18", "claim": "\u2026pgBackRest + compress 128 127 8.25 29.00 8.1x\u2026", "title": "The compressed 128-process speedup is 7.48\u00d7, not 8.1\u00d7", "explanation": "The compressed 128-process run achieves 7.48\u00d7 baseline speed (derived: 950 seconds / 127 seconds). The table lists 8.1\u00d7. That overstates the elapsed-time speedup by 8.3%.", "verdict": "False", "sources": []}, {"anchor": "F13", "url": "https://pgtrue.postgres.ai/shared/brief/9f32e744-4150-4ff0-a747-4aea251c27d2#F13", "claim": "\u2026# This prevents WAL files from being removed before the replica consumes them\u2026", "title": "The illustrated replication slot does not protect WAL", "explanation": "The one-argument slot function reserves WAL only when a client first uses the slot. doc/src/sgml/func.sgml:29579 documents this behavior. The example never sets primary_slot_name and creates the slot after copying. Required WAL can disappear before startup. PostgreSQL then requires another base backup.", "verdict": "Dangerous", "sources": [{"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/doc/src/sgml/func.sgml#L29579-L29582", "label": "REL_18_0 \u00b7 doc/src/sgml/func.sgml:29579-29582"}, {"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/doc/src/sgml/config.sgml#L4958-L4961", "label": "REL_18_0 \u00b7 doc/src/sgml/config.sgml:4958-4961"}, {"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/doc/src/sgml/high-availability.sgml#L787-L790", "label": "REL_18_0 \u00b7 doc/src/sgml/high-availability.sgml:787-790"}]}, {"anchor": "F5", "url": "https://pgtrue.postgres.ai/shared/brief/9f32e744-4150-4ff0-a747-4aea251c27d2#F5", "claim": "\u2026time pgbackrest --stanza=\"$STANZA_TMP\" --type=full --process-max=4 backup\u2026", "title": "Benchmark commands omit the temporary configuration", "explanation": "The benchmark commands omit --config. CONFIG_FILE is a shell variable, not a recognized pgBackRest configuration environment variable. With only the temporary setup, those commands cannot load the configured stanza.", "verdict": "Recipe error", "sources": [{"url": "https://github.com/pgbackrest/pgbackrest/blob/d9773a31c97077761ee8e7d06e073b0b0734e26f/src/build/config/config.yaml#L273-L277", "label": "pgbackrest@release/2.57.0 \u00b7 src/build/config/config.yaml:273-277"}, {"url": "https://github.com/pgbackrest/pgbackrest/blob/d9773a31c97077761ee8e7d06e073b0b0734e26f/src/config/parse.h#L19-L20", "label": "pgbackrest@release/2.57.0 \u00b7 src/config/parse.h:19-20"}]}, {"anchor": "F2", "url": "https://pgtrue.postgres.ai/shared/brief/9f32e744-4150-4ff0-a747-4aea251c27d2#F2", "claim": "\u2026asynchronous I/O (we left settings default: io_method=worker and io_workers=3 ) can speed it up significantly.", "title": "PostgreSQL 18 AIO does not accelerate this backup read path", "explanation": "PostgreSQL 18.0 copies backup files through synchronous pg_pread. This path does not dispatch reads to io_workers. The reported 1.08 GiB/s does not establish an AIO speedup.", "verdict": "Misleading", "sources": [{"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/backend/utils/misc/guc_tables.c#L5412-L5419", "label": "REL_18_0 \u00b7 src/backend/utils/misc/guc_tables.c:5412-5419"}, {"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/backend/backup/basebackup.c#L2115-L2123", "label": "REL_18_0 \u00b7 src/backend/backup/basebackup.c:2115-2123"}, {"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/backend/backup/basebackup.c#L1858-L1861", "label": "REL_18_0 \u00b7 src/backend/backup/basebackup.c:1858-1861"}]}, {"anchor": "F10", "url": "https://pgtrue.postgres.ai/shared/brief/9f32e744-4150-4ff0-a747-4aea251c27d2#F10", "claim": "\u2026standard SQL connectivity for pgBackRest verification\u2026", "title": "The SQL prerequisite checks a different database role", "explanation": "The configuration never assigns REPLICATION_USER to pg1-user. pgBackRest uses the remote OS account or PGUSER for SQL. A TCP psql check as REPLICATION_USER does not verify that backup connection.", "verdict": "Mostly accurate", "sources": [{"url": "https://github.com/pgbackrest/pgbackrest/blob/d9773a31c97077761ee8e7d06e073b0b0734e26f/src/build/help/help.xml#L1959-L1964", "label": "pgbackrest@release/2.57.0 \u00b7 src/build/help/help.xml:1959-1964"}, {"url": "https://github.com/pgbackrest/pgbackrest/blob/d9773a31c97077761ee8e7d06e073b0b0734e26f/src/db/helper.c#L33-L41", "label": "pgbackrest@release/2.57.0 \u00b7 src/db/helper.c:33-41"}]}, {"anchor": "F17", "url": "https://pgtrue.postgres.ai/shared/brief/9f32e744-4150-4ff0-a747-4aea251c27d2#F17", "claim": "\u2026pgBackRest 32 101 10.13 35.61 9.4x\u2026", "explanation": "The 32-process result gives 10.4 GiB/s and 36.5 TiB/hour (derived: 1.023 TiB / 101 seconds). E-51 lists 10.13 GiB/s and 35.61 TiB/hour. Correct the stated database size or this row's calculated rates.", "verdict": "Mostly accurate", "sources": []}, {"anchor": "F19", "url": "https://pgtrue.postgres.ai/shared/brief/9f32e744-4150-4ff0-a747-4aea251c27d2#F19", "claim": "\u2026Nearly linear scaling: performance doubles with each doubling of parallelism up to 16 processes (96% efficiency)\u2026", "title": "Scaling efficiency through 16 processes is 88%, not 96%", "explanation": "Scaling from 4 to 16 processes achieves 87.7% efficiency (derived: 575 / 164 / 4). The 8-to-16-process step achieves 90.9%. Only the 4-to-8-process step reaches approximately 96%.", "verdict": "Mostly accurate", "sources": []}, {"anchor": "F6", "url": "https://pgtrue.postgres.ai/shared/brief/9f32e744-4150-4ff0-a747-4aea251c27d2#F6", "claim": "\u2026io_method=worker and io_workers=3\u2026", "title": "PostgreSQL 18 defaults match worker and three workers", "explanation": "PostgreSQL 18.0 defaults io_method to worker and io_workers to 3. These defaults do not establish that pg_basebackup uses AIO.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/doc/src/sgml/config.sgml#L2778-L2785", "label": "REL_18_0 \u00b7 doc/src/sgml/config.sgml:2778-2785"}, {"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/backend/utils/misc/guc_tables.c#L3309-L3317", "label": "REL_18_0 \u00b7 src/backend/utils/misc/guc_tables.c:3309-3317"}, {"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/backend/utils/misc/guc_tables.c#L5412-L5419", "label": "REL_18_0 \u00b7 src/backend/utils/misc/guc_tables.c:5412-5419"}]}, {"anchor": "F7", "url": "https://pgtrue.postgres.ai/shared/brief/9f32e744-4150-4ff0-a747-4aea251c27d2#F7", "claim": "\u2026primary_conninfo = 'user=''$REPLICATION_USER'' host=''$PRIMARY'' application_name=''$HOSTNAME'' '\u2026", "title": "primary_conninfo configures the streaming connection", "explanation": "primary_conninfo supplies the standby connection string. Recovery passes it to RequestXLogStreaming. Slot selection remains a separate primary_slot_name setting.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/doc/src/sgml/config.sgml#L4911-L4915", "label": "REL_18_0 \u00b7 doc/src/sgml/config.sgml:4911-4915"}, {"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/backend/access/transam/xlogrecovery.c#L3869-L3874", "label": "REL_18_0 \u00b7 src/backend/access/transam/xlogrecovery.c:3869-3874"}]}, {"anchor": "F8", "url": "https://pgtrue.postgres.ai/shared/brief/9f32e744-4150-4ff0-a747-4aea251c27d2#F8", "claim": "\u2026application_name=''$HOSTNAME''\u2026", "title": "application_name accepts the replica hostname label", "explanation": "application_name labels the connection in statistics and logs. The supplied hostname assignment uses that setting for the replica connection.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/backend/utils/misc/guc_tables.c#L4875-L4877", "label": "REL_18_0 \u00b7 src/backend/utils/misc/guc_tables.c:4875-4877"}]}, {"anchor": "F9", "url": "https://pgtrue.postgres.ai/shared/brief/9f32e744-4150-4ff0-a747-4aea251c27d2#F9", "claim": "\u2026No restore_command needed for streaming replication\u2026", "title": "Streaming replication does not require restore_command", "explanation": "PostgreSQL 18.0 makes restore_command optional for streaming replication. Recovery accepts its absence. Streaming still requires the primary to retain every needed WAL segment.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/doc/src/sgml/config.sgml#L4030-L4033", "label": "REL_18_0 \u00b7 doc/src/sgml/config.sgml:4030-4033"}, {"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/backend/access/transam/xlogarchive.c#L70-L77", "label": "REL_18_0 \u00b7 src/backend/access/transam/xlogarchive.c:70-77"}, {"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/doc/src/sgml/high-availability.sgml#L643-L646", "label": "REL_18_0 \u00b7 doc/src/sgml/high-availability.sgml:643-646"}]}, {"anchor": "F14", "url": "https://pgtrue.postgres.ai/shared/brief/9f32e744-4150-4ff0-a747-4aea251c27d2#F14", "claim": "\u2026The standard approach to creating a Postgres replica uses pg_basebackup\u2026", "title": "pg_basebackup supports standby creation", "explanation": "PostgreSQL 18 documents pg_basebackup output for standby setup. doc/src/sgml/ref/pg_basebackup.sgml:237 describes the recovery connection settings written by --write-recovery-conf.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/doc/src/sgml/ref/pg_basebackup.sgml#L237-L240", "label": "REL_18_0 \u00b7 doc/src/sgml/ref/pg_basebackup.sgml:237-240"}]}]}