ซีรีส์ย้ายระบบ

RDS Postgres to ClickHouse Managed Postgres

Same SQL, new stack.

Move a live e-commerce workload off AWS RDS Postgres onto ClickHouse Managed Postgres with a minute of write downtime, stream the analytical copy into ClickHouse with ClickPipes, and route the dashboard's queries to it without changing a line of SQL.

4–6 hoursAdvanced8 modules
PostgresManaged PostgresClickPipesMigration

What you will do

8 modules, in order

  1. 00

    Provision your accounts, verify the toolchain on macOS or Windows, authenticate the ClickHouse CLI, and prove your AWS permissions before anything is applied.

  2. 01

    Apply the Terraform, prove wal_level is logical, seed the shop database inside RDS, then measure twice - writer alone, writer under dashboard load - to see what one database serving both workloads actually costs.

  3. 02

    Author the runbook you will execute in module 04 - replication scope, the lag signal, sequences, verification, abort criteria and the rollback trigger - before you have a target to rush at.

  4. 03

    Create the Managed Postgres instance and the migration ClickPipe, watch the initial load hand over to CDC, and break replication on purpose to see what an orphaned slot costs.

  5. 04

    Execute the runbook you wrote in module 02 against a live write path, reset the sequences, repoint the application and the dashboard, then reconcile and stop replicating.

  6. 05

    Create a ClickPipes Postgres CDC pipe from Managed Postgres into ClickHouse, choose ReplacingMergeTree and ordering keys deliberately, and watch the initial load hand over to continuous sync.

  7. 06

    Install pg_clickhouse, shadow one role's search_path so unchanged panel SQL executes in ClickHouse, prove the routing three ways, repair the panel that will not push down, and measure the result.

  8. 07

    Fourteen machine-graded questions on the decisions this workshop asked you to make, then the teardown sequence in the one order that works.

TH