Skip to content

A/B Import#1

Merged
pansen merged 6 commits into
mainfrom
feat/andi/a_b_import
Jun 1, 2026
Merged

A/B Import#1
pansen merged 6 commits into
mainfrom
feat/andi/a_b_import

Conversation

@pansen

@pansen pansen commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Provide a way to import to a staging instance, via different port 5433, while the active instance on port 5432 remains available.

Once the expensive import on staging is done, one can make pg.promote and staging flips to active and vice versa.

pansen added 6 commits June 1, 2026 15:28
```
q:qb pansen/colima-incus feat/andi/a_b_import 244ms$ make pg.status pg.ip pg.snapshots
scripts/pg-dev-local status
active slot: b   (active = pg-dev-b, staging = pg-dev-a)

+------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
|    NAME    |  STATE  |         IPV4          |                     IPV6                      |   TYPE    | SNAPSHOTS |
+------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
| pg-bouncer | RUNNING | 192.168.100.2 (eth0)  | fd42:5a94:fea:bc22:1266:6aff:fe3f:2049 (eth0) | CONTAINER | 0         |
+------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
| pg-dev-a   | RUNNING | 192.168.100.53 (eth0) | fd42:5a94:fea:bc22:1266:6aff:fede:a68c (eth0) | CONTAINER | 2         |
+------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
| pg-dev-b   | RUNNING | 192.168.100.27 (eth0) | fd42:5a94:fea:bc22:1266:6aff:fe5f:4b9b (eth0) | CONTAINER | 1         |
+------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
active    192.168.100.2:5432      →  pg-dev-b   (192.168.100.27)
staging   192.168.100.2:5433      →  pg-dev-a   (192.168.100.53)
scripts/pg-dev-local snapshots
─── active  (pg-dev-b) ───
+---------+-----------------------+------------+----------+
|  NAME   |       TAKEN AT        | EXPIRES AT | STATEFUL |
+---------+-----------------------+------------+----------+
| initial | 2026/06/01 16:02 CEST |            | NO       |
+---------+-----------------------+------------+----------+

─── staging (pg-dev-a) ───
+---------------------------------+-----------------------+------------+----------+
|              NAME               |       TAKEN AT        | EXPIRES AT | STATEFUL |
+---------------------------------+-----------------------+------------+----------+
| initial                         | 2026/06/01 16:01 CEST |            | NO       |
+---------------------------------+-----------------------+------------+----------+
| 2026-06-01T17-20-21_dump_import | 2026/06/01 17:20 CEST |            | NO       |
+---------------------------------+-----------------------+------------+----------+
q:qb pansen/colima-incus feat/andi/a_b_import 774ms$ make pg.promote
scripts/pg-dev-local promote
==> Promoting: active b → a
==> Promoted. Active: pg-dev-a   Staging: pg-dev-b

active slot: a   (active = pg-dev-a, staging = pg-dev-b)

+------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
|    NAME    |  STATE  |         IPV4          |                     IPV6                      |   TYPE    | SNAPSHOTS |
+------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
| pg-bouncer | RUNNING | 192.168.100.2 (eth0)  | fd42:5a94:fea:bc22:1266:6aff:fe3f:2049 (eth0) | CONTAINER | 0         |
+------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
| pg-dev-a   | RUNNING | 192.168.100.53 (eth0) | fd42:5a94:fea:bc22:1266:6aff:fede:a68c (eth0) | CONTAINER | 2         |
+------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
| pg-dev-b   | RUNNING | 192.168.100.27 (eth0) | fd42:5a94:fea:bc22:1266:6aff:fe5f:4b9b (eth0) | CONTAINER | 1         |
+------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
q:qb pansen/colima-incus feat/andi/a_b_import 612ms$ make pg.status pg.ip pg.snapshots
scripts/pg-dev-local status
active slot: a   (active = pg-dev-a, staging = pg-dev-b)

+------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
|    NAME    |  STATE  |         IPV4          |                     IPV6                      |   TYPE    | SNAPSHOTS |
+------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
| pg-bouncer | RUNNING | 192.168.100.2 (eth0)  | fd42:5a94:fea:bc22:1266:6aff:fe3f:2049 (eth0) | CONTAINER | 0         |
+------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
| pg-dev-a   | RUNNING | 192.168.100.53 (eth0) | fd42:5a94:fea:bc22:1266:6aff:fede:a68c (eth0) | CONTAINER | 2         |
+------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
| pg-dev-b   | RUNNING | 192.168.100.27 (eth0) | fd42:5a94:fea:bc22:1266:6aff:fe5f:4b9b (eth0) | CONTAINER | 1         |
+------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
active    192.168.100.2:5432      →  pg-dev-a   (192.168.100.53)
staging   192.168.100.2:5433      →  pg-dev-b   (192.168.100.27)
scripts/pg-dev-local snapshots
─── active  (pg-dev-a) ───
+---------------------------------+-----------------------+------------+----------+
|              NAME               |       TAKEN AT        | EXPIRES AT | STATEFUL |
+---------------------------------+-----------------------+------------+----------+
| initial                         | 2026/06/01 16:01 CEST |            | NO       |
+---------------------------------+-----------------------+------------+----------+
| 2026-06-01T17-20-21_dump_import | 2026/06/01 17:20 CEST |            | NO       |
+---------------------------------+-----------------------+------------+----------+

─── staging (pg-dev-b) ───
+---------+-----------------------+------------+----------+
|  NAME   |       TAKEN AT        | EXPIRES AT | STATEFUL |
+---------+-----------------------+------------+----------+
| initial | 2026/06/01 16:02 CEST |            | NO       |
+---------+-----------------------+------------+----------+
```
Copilot AI review requested due to automatic review settings June 1, 2026 15:49
@pansen pansen changed the title Feat/andi/a b import A/B Import Jun 1, 2026
@pansen
pansen merged commit 272e988 into main Jun 1, 2026
1 check failed
@pansen
pansen deleted the feat/andi/a_b_import branch June 1, 2026 15:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

2 participants