Skip to main content
Release Date: July 6th, 2026 pgstream v1.1.1 is a patch release. It hardens the logical-replication path against SQL injection, fixes five snapshot-restore correctness bugs that surface on production-shaped schemas (materialized views, inherited and partitioned tables, 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 CREATE and DROP bind the slot name as a parameter.
  • START_REPLICATION escapes 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 DATA after 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:
    source:
      postgres:
        snapshot:
          schema:
            pgdump_pgrestore:
              refresh_materialized_views: true
    
  • 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 ON is restored after its referenced index (PR #907). Restoring CLUSTER ON before the index it references failed on an ordering error; the statement is now emitted after the index exists.
  • int4range, int8range, and tstzrange values are typed before INSERT/COPY (PR #910). Range columns previously failed on restore because the value was passed untyped. (The PR title mentions only int4range/int8range; the shipped code also types tstzrange.)
  • Legacy public PL/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 xata CLI 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