CLUSTER ON ordering, range-type typing, and legacy handler functions), and backports the security fix to the 0.9.x line as v0.9.15. No migration is required.
SQL Parameter Binding and Escaping
PR #965, by @kvch. Backported as v0.9.15. Three raw-text interpolation spots in the logical-replication path are now bound as parameters or validated before use:- WAL identifier quoting now validates a single complete quoted token instead of trusting leading and trailing
", so a crafted source object name cannot break out onto the target. - Replication slot
CREATEandDROPbind the slot name as a parameter. START_REPLICATIONescapes table-filter plugin options and validates the slot name before use.
Snapshot Restore Correctness
Five fixes, all contributed by @danddanddand in their first contribution to pgstream. Each surfaces on real production schemas rather than a test database.-
Materialized views are refreshed after restore (PR #908). Matviews previously restored empty; pgstream now runs
REFRESH MATERIALIZED VIEW ... WITH DATAafter the table data is restored. Refresh is opt-in and off by default, because refreshing large views is expensive. Enable it in the snapshot config: -
Inherited and partition child rows are no longer copied twice (PR #909). Snapshot CTID queries now use
ONLY, so child rows of inheritance and partition hierarchies are excluded from the parent scan. -
CLUSTER ONis restored after its referenced index (PR #907). RestoringCLUSTER ONbefore the index it references failed on an ordering error; the statement is now emitted after the index exists. -
int4range,int8range, andtstzrangevalues are typed beforeINSERT/COPY(PR #910). Range columns previously failed on restore because the value was passed untyped. (The PR title mentions onlyint4range/int8range; the shipped code also typeststzrange.) -
Legacy
publicPL/pgSQL handler functions are skipped on restore (PR #906). Databases carrying these handlers from old Postgres upgrades no longer hit a restore conflict.
CLI
- The
xataCLI is rebuilt against pgstream v1.1.1.
Upgrade
No migration is required when upgrading from v1.0.x or v1.1.0. Replace the binary and restart pgstream. Users on the 0.9.x line who only need the security fix can take v0.9.15 without upgrading to 1.x.Support
- Issues: https://github.com/xataio/pgstream/issues
- Documentation: https://github.com/xataio/pgstream/tree/main/docs
- Discussions: https://github.com/xataio/pgstream/discussions