PostgreSQL into Semurg and out to a fresh PostgreSQL: a round trip you can check
25 November 2026 · Semurg · 2 min read · Markdown
postgresqlmigrationround-triprest
What you need: a Semurg node from the install page, two PostgreSQL servers (A with your data, B empty), and the node's API token. Use a login on A that can only read, made for this copy, and remove it afterwards.
Step one: See the connectors
curl -s -H "Authorization: Bearer $SEMURG_API_TOKEN" -H 'content-type: application/json' http://localhost:4000/v1/query -d '{"op":"connectors"}'The answer lists the connector families your node carries. PostgreSQL is the family called pgwire.
Step two: Copy A into Semurg
curl -s -H "Authorization: Bearer $SEMURG_API_TOKEN" -H 'content-type: application/json' http://localhost:4000/v1/query -d '{"op":"connector_ingest","family":"pgwire","options":{"host":"pg-a","port":5432,"user":"copy_reader","password":"...","database":"shop","schema":"public","db":"shop_copy"}}'The answer is a job id.
Step three: Watch it
curl -s -H "Authorization: Bearer $SEMURG_API_TOKEN" -H 'content-type: application/json' http://localhost:4000/v1/query -d '{"op":"job","id":"<the job id>"}'Repeat until the state is done. A step that is refused names its reason, for example a table without a primary key.
Step four: Write it out to B
curl -s -H "Authorization: Bearer $SEMURG_API_TOKEN" -H 'content-type: application/json' http://localhost:4000/v1/query -d '{"op":"connector_egress","family":"pgwire","options":{"host":"pg-b","port":5432,"user":"copy_writer","password":"...","database":"shop","schema":"public","source_db":"shop_copy"}}'B must be empty: a table that already exists is refused.
Step five: Check both ends yourself
Dump the schema and every row in key order from A and from B, and compare the checksums. Then change one value in B and compare again: the checksums must now differ. If they do not, your check cannot fail and proves nothing.
What we saw
On the release of 25 November 2026 the round trip came back equal at both ends, with JSON, exact decimals, timestamps with time zones, foreign keys, empty strings kept apart from NULL and unicode all carried across, and the changed value was caught. The table of what moved and how long it took is on the data migration page; those times show that the round trip works and are not a speed benchmark.
What it does not do yet
- It does not keep A and B in sync while both are in use.
- It does not carry views, stored procedures or triggers.
- A table without a primary key is refused.
- The copy takes many times the raw size of the data on the Semurg side today; the current figure is on the data migration page.
- The password travels in the request, and the connection to PostgreSQL is not encrypted on the published release (TLS is coming): use a read-only account made for this copy, on a private network or through an SSH tunnel, and remove it afterwards. Naming a stored login instead is coming.
What Semurg is: a memory that lasts for your AI agents, on a machine you run.
Why use it: your agent recalls the facts it needs, each with its source, instead of reading the project again.
What it solves today: agents that forget between sessions, and data that must stay on your own machines.
Try it: curl -fsSL https://one.semurg.io/install | sudo bash, first node free forever.
This post was written with AI assistance. Every result in it is checked against a published release or record before the post goes out.