pgcopydb option coverage
Every pgcopydb clone and pgcopydb follow option (pgcopydb 0.18, per the upstream reference) mapped to its Migration spec field, to operator-managed behavior, or to an explicit exclusion.
pgcopydb clone
| pgcopydb option | Migration spec | Notes |
|---|---|---|
--source |
spec.source |
Rendered to PGCOPYDB_SOURCE_PGURI; credentials via passfile, never argv. |
--target |
spec.target |
Rendered to PGCOPYDB_TARGET_PGURI. |
--dir |
operator-managed | Fixed to /work/pgcopydb on the work PVC; spec.workVolume sizes it. |
--table-jobs |
spec.clone.tableJobs |
|
--index-jobs |
spec.clone.indexJobs |
|
--restore-jobs |
spec.clone.restoreJobs |
0 follows indexJobs, as upstream. |
--large-objects-jobs |
spec.clone.largeObjectsJobs |
|
--split-tables-larger-than |
spec.clone.splitTablesLargerThan |
Quantity, rendered to plain bytes. |
--split-max-parts |
spec.clone.splitMaxParts |
|
--estimate-table-sizes |
spec.clone.estimateTableSizes |
Runs vacuumdb --analyze-only on the source to refresh the estimates, unless skip: analyze is also set. |
--drop-if-exists |
spec.clone.dropIfExists |
|
--roles |
spec.clone.roles |
|
--no-role-passwords |
spec.clone.noRolePasswords |
|
--no-owner |
spec.clone.noOwner |
spec.clone.ownerAfterRestore builds on it, an operator-level handover run after the worker exits; see Ownership after restore. |
--no-acl |
spec.clone.noACL |
|
--no-comments |
spec.clone.noComments |
|
--no-tablespaces |
spec.clone.noTablespaces |
|
--skip-large-objects |
spec.clone.skip: largeObjects |
|
--skip-extensions |
spec.clone.skip: extensions |
|
--skip-ext-comments |
spec.clone.skip: extensionComments |
Already implied by skip: extensions; on its own it installs extensions without their COMMENTs. |
--skip-collations |
spec.clone.skip: collations |
|
--skip-vacuum |
spec.clone.skip: vacuum |
|
--skip-analyze |
spec.clone.skip: analyze |
|
--skip-db-properties |
spec.clone.skip: dbProperties |
|
--skip-split-by-ctid |
spec.clone.skip: ctidSplit |
|
--requirements |
not exposed | Needs a file produced by pgcopydb list extensions --requirements --json, which has no declarative form in the spec. |
--filters |
spec.clone.filters |
Rendered to the INI, mounted from an operator-owned ConfigMap. All eight filter sections are covered. |
--fail-fast |
spec.clone.failFast |
|
--restart |
operator-managed | First attempt only: any pre-existing work-dir state is foreign and gets wiped. |
--resume |
operator-managed | Retry attempts resume from the work-dir catalogs. |
--not-consistent |
operator-managed | Paired with --resume: the failed attempt's snapshot died with its process. |
--snapshot |
not exposed | Needs a snapshot-holder sidecar to keep the exported snapshot alive for the whole clone. |
--follow |
spec.follow.enabled |
|
--plugin |
spec.follow.plugin |
|
--publication |
spec.follow.publication |
Empty lets pgcopydb create and drop its own. |
--wal2json-numeric-as-string |
spec.follow.wal2jsonNumericAsString |
CEL rejects it unless follow.plugin is wal2json; other plugins would silently ignore it. |
--replay-no-op-updates |
spec.follow.replayNoOpUpdates |
|
--slot-name |
spec.follow.slotName |
Empty generates a unique per-Migration name; a set name is pattern-restricted to PostgreSQL's slot charset. |
--create-slot |
not exposed | clone --follow creates the slot during setup; nothing to configure. |
--origin |
operator-managed | Always the same generated per-Migration name as the slot; unique, so fan-in stays safe. |
--endpos |
operator-managed | Cutover sets it at runtime via stream sentinel set endpos --current. |
--use-copy-binary |
spec.clone.useCopyBinary |
On by default. pgcopydb falls back to text per table when a column's binary encoding is unsafe. |
--all-databases |
spec.clone.allDatabases |
Needs superuser on both sides; see All databases. |
--host / --port |
not exposed | The operator drives the sentinel via pods/exec, not the TCP coordinator. |
--verbose / --debug / --trace / --quiet |
not exposed | Runner logs are structured JSON (PGCOPYDB_LOG_JSON=on) at the default level. |
pgcopydb follow
The standalone follow command exposes a subset of the clone options with identical semantics; the rows above cover all of them.
The operator never runs standalone follow: it always runs clone --follow.
The base copy and the replication slot then share one snapshot, which keeps the result consistent.
spec.follow.maxCatchupLag, spec.cutover, spec.suspend, spec.dryRun, spec.backoffLimit, spec.ttlSecondsAfterFinished, and the per-side superuserSecretRef are operator-level controls with no pgcopydb flag behind them.
pgcopydb compare
With spec.clone.allDatabases: true, the schema compare also receives --all-databases.
Admission rejects verification.data in this mode because pgcopydb produces no JSON report for the strict wrapper to evaluate.
spec.verification.schema and spec.verification.data run pgcopydb compare schema and pgcopydb compare data after completion, each in its own Job on the work PVC.
Both take source, target, and --dir from the same operator-managed values as the rows above.
compare data adds --json and runs inside a wrapper that takes its verdict from the report, not from the exit code.
Stock pgcopydb 0.18 logs a differing table and still exits 0; the bundled runner's patched pgcopydb exits nonzero instead.
The wrapper reads the report back through psql, the only JSON parser in the runner image.
It fails the Job when a table differs on row count or checksum.
A compare that could not run, or a report that could not be read, fails the Job too.
The wrapper prints the report it evaluates, so the Job log keeps the per-table detail.