Installation
pgsink runs on the same host as the Apiary daemon, as the daemon's user. That is not a preference — see Deployment for why, and read it before you pick an install method, because it decides which one fits.
The same tap Apiary itself installs from:
Upgrades with brew upgrade --cask pgsink.
Download from releases, for macOS or Linux on amd64 or arm64:
VERSION=0.1.1
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
curl -sSLO "https://github.com/orlandoburli/apiary-pgsink/releases/download/v${VERSION}/pgsink_${VERSION}_${OS}_${ARCH}.tar.gz"
curl -sSLO "https://github.com/orlandoburli/apiary-pgsink/releases/download/v${VERSION}/checksums.txt"
shasum -a 256 -c checksums.txt --ignore-missing
tar -xzf "pgsink_${VERSION}_${OS}_${ARCH}.tar.gz"
sudo install -m0755 pgsink /usr/local/bin/pgsink
The archive also carries the service files — deploy/pgsink.service for
systemd and deploy/com.orlandoburli.pgsink.plist for launchd — and a
worked examples/pgsink.yaml.
On macOS an unsigned binary is quarantined by Gatekeeper. The Homebrew cask clears it for you; downloading by hand does not:
Multi-arch, 37MB, static. It must bind-mount the Apiary data directory read-write and run as the daemon's user — see Operating.
Verify it
doctor reads your Apiary database and checks it against pgsink's table
catalog. A clean result looks like this:
catalog 24 tables, schema_version 1, apiary >=0.12.0
database /Users/you/.apiary/apiary.db
schema no drift — the catalog matches all 24 tables
Warnings are normal on an older Apiary — a table that does not exist yet is skipped, not a failure. Errors mean replication would be incorrect; see Table catalog.
What you also need
- An Apiary daemon on this host, version 0.12.0 or newer.
- PostgreSQL 13 or newer as the target. This is the only thing that has to be reachable over the network; everything else is local.
Next: Quickstart.