Skip to content

docs: PostgreSQL cross-cluster instance migration guide (KB260720001) + pending PG-solutions review fixes#809

Open
SuJinpei wants to merge 9 commits into
mainfrom
docs/add-postgresql-kb-solutions-31526
Open

docs: PostgreSQL cross-cluster instance migration guide (KB260720001) + pending PG-solutions review fixes#809
SuJinpei wants to merge 9 commits into
mainfrom
docs/add-postgresql-kb-solutions-31526

Conversation

@SuJinpei

Copy link
Copy Markdown
Contributor

What

  • New solution doc: How_to_Migrate_a_PostgreSQL_Instance_Across_Clusters.md (KB260720001) — cross-cluster/cross-platform PostgreSQL instance migration using the operator's hot-standby (XCR) feature with a two-phase switchover and checksum-gated cutover. Companion to KB251000009 (Hot Standby Cluster Configuration Guide).
  • Carried-over review fixes from the PR add PostgreSQL node migration and CloudBeaver solutions (MIDDLEWARE-31526) #792 stream that were committed after its squash-merge and never landed: CodeRabbit fixes to the node-migration and CloudBeaver docs, and removal of hand-written zh mirrors (pipeline auto-generates them).

Validation

The migration guide was validated end-to-end on 2026-07-20 with operator v4.3.3 on two separate ACP platforms (NodePort pairing, arm64, PG 16): standby bootstrap from peer, checksum parity, demote-then-promote switchover, reverse replication after cutover.

The troubleshooting section encodes real failures encountered during validation, including the cross-version XCR schema drift (ECO-703) and the standby-recreate secret cleanup trap.

🤖 Generated with Claude Code

SuJinpei and others added 4 commits June 18, 2026 06:01
…1526)

Precipitate historical internal KB PostgreSQL solutions, modernized to
the current acid.zalan.do/v1 postgresql CR and verified live on ACP
4.2/4.3, bilingual (en + zh):

- KB260515007 How to Migrate a PostgreSQL Instance to Another Node
- KB260515008 How to Deploy CloudBeaver for PostgreSQL Management

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The zh translations are produced by the translation pipeline from the
en sources (tracked via sourceSHA); they should not be committed by hand.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- CloudBeaver: retrieve superuser password from the operator-created Secret
  (postgres.<cluster>.credentials...) instead of a non-existent PGPASSWORD_SUPERUSER env var
- node migration: label only the target node to avoid rescheduling onto the source

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…001)

Validated end-to-end on operator v4.3.3 across two ACP platforms
(NodePort pairing, two-phase switchover, checksum-gated cutover).
Includes troubleshooting for the ECO-703 cross-version XCR schema
drift and standby-recreate secret cleanup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ordered teardown (standby first, then remove clusterReplication from the
promoted primary), operator-side cleanup behavior (sys_operator schema drop,
xdc_hotstandby slot removal), leftover-object cleanup, and verification.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…slot/xcr svc)

Ran the full teardown on the validated v4.3.3 pair: sys_operator schema
drop confirmed automatic; PVC retention is config-dependent (deleted with
the CR on v4.3.3); the physical xdc_hotstandby slot and the -xcr service
linger and need manual removal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
For topologies with no inter-cluster network where the workstation reaches
both API servers: pg_dump piped between two kubectl exec sessions. Validated
live (100k rows, exact checksum parity, clean exit); documents the
version-matched-binary and spilo-schema-exclusion requirements found during
validation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…721001

Workstation-relayed logical migration as its own doc, tested verbatim
end-to-end before commit. Testing corrected the restore identity: restore
as the CR-defined application user (plus --no-comments), otherwise objects
land owned by postgres and the app user cannot query them. Migration guide
now links to the standalone doc instead of embedding the procedure.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Verify with exact per-table counts (query_to_xml) instead of the
  n_live_tup estimate, in both baseline and post-restore steps
- Run the relay pipe under pipefail and report per-side PIPESTATUS so a
  source-side dump failure cannot be masked
- Add extension preflight: inventory pg_extension on the source and
  pre-create missing extensions as postgres on the target; new
  troubleshooting entry for 'permission denied to create extension'
- Scope the ownership guidance to the single-owner operator layout and
  extend the fallback ALTER note beyond public tables/sequences
- Add security notes: password visibility in local process listings,
  dump-file permissions/retention, TLS transport
- List required Kubernetes permissions and Spilo image assumptions in
  Prerequisites
- Reword the 'no version-matching constraints' claim (here and in the
  companion guide's pointer) to same-or-newer target major, no downgrades

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant