Installation
Upgrades and restarts
Upgrade the SQL Flow control plane, log brokers and agents in the right order, and see what each component keeps across a restart.
Each SQL Flow component is upgraded on its own, while pipelines keep running. This page covers the version support window, the upgrade order and steps, and what each component keeps when it restarts.
Versions and the support window
Every control plane, agent and log broker release has a version of the form YYYY.M.D.BUILD: its release date, then a build number. The Version row on each agent and broker card shows it, and SqlFlow.Agent --version, SqlFlow.LogBroker --version and sqlflow --version print the version of an executable you have.
An agent or broker is supported for 12 months after the date in its version, whatever the control plane's version. The card's chip shows where it stands:
| Chip | Meaning |
|---|---|
| In window | Supported. |
| Upgrade soon | In the last 60 days of its 12 months. It is still served. |
| Support ended | Past its 12 months. Its running pipelines keep running, but it gets no configuration changes and no new work until you upgrade it. |
| Unrecognized version | Its version isn't a release version, or is dated ahead of the control plane's clock. Check the control plane's time synchronization first. |
| Too new | It needs a newer control plane. Its running pipelines keep running. |
| Unsupported | It is a development build, or this control plane can't manage it. Its running pipelines keep running. |
| Build denied | The control plane refuses this exact build, which stops within 24 hours. Install another release. |
Registration of an out-of-window agent is refused before it uses the join code, so you can retry with a supported release and the same code.
Upgrade order
- Control plane. It is always the newest component.
- Log brokers, one host at a time.
- Agents. For a relay pipeline, upgrade the apply agent before the capture agent.
You can stop between steps. Replication continues throughout.
Upgrade the control plane
Hybrid. Spectral Core upgrades the hosted control plane for you, continuously, and existing pipelines aren't affected. When an agent or broker release you run nears the end of its support, its card shows Upgrade soon well in advance.
Air-gapped. Upgrade a single instance as follows. For several instances, see High availability: Control plane.
- Back up the PostgreSQL database.
- Run the migration step with the new image and your existing settings:
docker run --rm --env-file /etc/sqlflow/control-plane.env \
-v /etc/sqlflow/secrets:/run/secrets:ro -v sqlflow-keys:/keys \
<new_control_plane_image> migrate- Replace the running container with one from the new image, with the same settings and volumes:
docker rm -f sqlflow-control-plane
docker run -d --name sqlflow-control-plane --restart unless-stopped -p 443:5100 \
--env-file /etc/sqlflow/control-plane.env \
-v /etc/sqlflow/secrets:/run/secrets:ro -v sqlflow-keys:/keys \
<new_control_plane_image>- Check
https://<control_plane_host>/healthzand sign in.
The web app and the CLI can't reach the control plane while the container restarts. Agents and brokers keep replicating, and reconnect on their own.
After migrate has run, an older control plane can refuse the database with store_schema_too_new. Don't restore an older database backup to undo an upgrade.
Upgrade a log broker
Download the new release from Downloads, or take it from your own copy in an air-gapped deployment. The broker's service runs the executable from the folder you installed it in. Replace that file with the new release:
Run in PowerShell as Administrator, from the folder that holds the new download:
Stop-Service -Name sqlflow-logbroker
Copy-Item -Path .\SqlFlow.LogBroker.exe -Destination 'C:\Program Files\SqlFlow\LogBroker\SqlFlow.LogBroker.exe' -Force
Start-Service -Name sqlflow-logbrokerUse the folder you installed the broker in. The broker keeps its identity and approval. While it is stopped, pipelines that read through it can't read the log; they recover when it is back. See High availability: Log brokers.
Upgrade an agent
- Download the new release from Downloads, or take it from your own copy in an air-gapped deployment. Copy it to the agent machine.
- Open Agents → Add agent, and run the install command the panel prints, from the folder that holds the new file. If the agent has a memory cap, add
--memory-limitagain; install clears a cap you don't repeat.
install keeps the agent's stored identity, so the agent needs no new approval. It replaces the executable and restarts the service. Pipelines continue from their last committed position; nothing is reloaded.
Roll back
- Agents and brokers. Install the previous release the same way. An agent can't read a spool written by a newer release and refuses it, so avoid rolling an agent back once it has run pipelines on the new release.
- Control plane. See the note under Upgrade the control plane.
What survives a restart
| Component | Kept across a restart | Where it is kept | Not kept |
|---|---|---|---|
| Agent | Identity and approval, the encrypted spool, resume checkpoints, initial-load markers, encryption keys, relay certificates | The agent's data directory | Nothing that affects data: work not yet committed at the target is read again from the source |
| Log broker | Identity, certificate, approval, allowed folders | The broker's data directory | Open reads; agents reconnect |
| Control plane | Pipelines, connections, accounts, agent and broker registrations, alerts, logs, schema events, the audit log, uptime and data-moved figures | PostgreSQL, unlocked by the Data Protection certificate | The recent history behind throughput and lag charts, connection tests in progress, and open dashboard streams, which reconnect |
What happens when a component restarts
- An agent restarts, after a reboot, a service restart or an upgrade. Each pipeline continues from its last committed position. If the control plane can't be reached when the agent starts, the agent waits, and its pipelines resume once it connects.
- The control plane restarts or can't be reached. Agents and brokers keep running the work they already have for up to 24 hours, and reconnect on their own. Nothing new starts and no configuration changes until the control plane is back. A revoked agent stops.
- A pipeline faults. The agent restarts it with growing delays. See Automatic restart.
