torque

Oracle/APEX To PostgreSQL

A complete Torque run for a stateful modernization graph: Kubernetes readiness, source freeze, export receipt, PostgreSQL restore point, schema expansion, checkpointed backfill, cutover, route promotion, schema contract, audit, and portable evidence export.

The Test

On May 23, 2026, I ran the Oracle/APEX to PostgreSQL showcase against a real single-node k8s lab host. The host ran Ubuntu 22.04.5 LTS with a Ready control-plane node.

The run created a temporary data-platform namespace with PostgreSQL, PostgreSQL-facing services, a simulated CNPG operator service, and an api-shadow service. Torque then ran the stack against PostgreSQL through a k8s port-forward.

The Graph

cnpg-ready
  -> postgres-cluster-ready
  -> pgbouncer-ready
  -> app-shadow-ready
  -> change-window-approved
  -> apex-readonly-window
  -> oracle-export
  -> pg-restore
  -> pg-expand
  -> pg-backfill
  -> pg-verify
  -> pg-cutover
  -> app-route-promote
  -> pg-contract
  -> post-cutover-check

The Commands

export TORQUE_K8S_READY_MODE=kubectl
export TORQUE_KUBECTL_BIN='kubectl'
export TORQUE_ORACLE_PG_DSN='postgres://postgres:***@127.0.0.1:15432/oracle_cutover?sslmode=disable'

./torque stack plan --config ./stack.yaml
./torque stack apply --config ./stack.yaml --yes
./torque stack audit --config ./stack.yaml --include-artifacts --output json > runtime/audit.json
./torque stack export --config ./stack.yaml --out runtime/oracle-postgres-run.tgz

The Result

15graph nodes
108events
30artifacts
1export bundle
run_id=2026-05-23T10-14-10.297189414Z
status=succeeded
bundle_kind=StackRunBundle
bundle_state_sha256=a446e6847f0634cfc6058955b73f033e905424a4cd8f931edc685437c93c398f
stage_rows=3
shadow_rows=3
route_flags=true,true,true
migration_audit=contracted

Why This Matters

Ansible can run SQL, call kubectl, wait for services, and write JSON files. That is not the hard part. The hard part is safely representing the production change: durable source-freeze receipt, export consistency proof, checkpointed backfill, one-time cutover semantics, route promotion after verification, contract cleanup after cutover, and an exportable run ledger.

In Ansible, those behaviors usually become conventions spread across playbooks, variables, registered results, state files, and log parsing. In Torque, they are the product model: compile the graph, enforce dependencies, emit typed artifacts, preserve event integrity, and export portable proof.

The Takeaway

Ansible executes the steps.
Torque owns the change program.