> ## Documentation Index
> Fetch the complete documentation index at: https://xata.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# v1.2.2

> pgstream v1.2.2 release notes

**Release Date:** July 22nd, 2026

pgstream v1.2.2 is a patch release. It makes the index and constraint restore phase of a snapshot tunable with per-session Postgres settings, warns when a snapshot source looks load-balanced, and fixes a stack-depth overflow on bulk deletes of tables with composite primary keys along with a `pg_restore` that ignored context cancellation. No migration is required.

## Session Settings for Index and Constraint Restore

[PR #990](https://github.com/xataio/pgstream/pull/990), contributed by [@jonasHanhan](https://github.com/jonasHanhan) in their first contribution.

Building indexes and validating constraints is the most resource-hungry phase of a snapshot restore, and the settings that make it fast are the ones you would not want applied to the data copy. Session settings can now be applied only to that phase:

```yaml theme={null} theme={null}
source:
  postgres:
    snapshot:
      schema:
        pgdump_pgrestore:
          index_constraint_session_settings:
            - maintenance_work_mem=4GB
            - max_parallel_maintenance_workers=4
```

Each entry must be a whitespace-free `name=value` pair. Leaving the setting unset preserves the previous behaviour.

The settings are validated at startup rather than at restore time ([PR #1021](https://github.com/xataio/pgstream/pull/1021)), so a typo fails immediately instead of hours into a snapshot, and a value cannot smuggle extra options into the session.

## Preflight Detects Load-Balanced Snapshot Sources

[PR #1015](https://github.com/xataio/pgstream/pull/1015), by [@kvch](https://github.com/kvch).

A data snapshot depends on `SET TRANSACTION SNAPSHOT` pinning one instance's view. Pointed at an Aurora or RDS reader endpoint, or a pooler that spans instances, successive connections can land on different instances and the snapshot silently mixes views. `pgstream check` now warns when the snapshot source looks load-balanced.

## Bug Fixes

* **Stack-depth overflow on bulk composite primary key deletes** ([PR #1024](https://github.com/xataio/pgstream/pull/1024)). Deletes on a table with a composite primary key were coalesced into an expression that grew with the batch, and a large enough batch exceeded Postgres' `max_stack_depth`, failing the whole statement.
* **`pg_restore` honors context cancellation** ([PR #1023](https://github.com/xataio/pgstream/pull/1023)). A restore in progress ignored cancellation, so shutdowns and timeouts hung until it finished on its own.

## New Contributors

* [@jonasHanhan](https://github.com/jonasHanhan) in [PR #990](https://github.com/xataio/pgstream/pull/990)

## Upgrade

No configuration changes are required. Replace the binary and restart pgstream. `index_constraint_session_settings` is opt-in, and invalid entries now fail at startup rather than at restore time.

## Support

* Issues: [https://github.com/xataio/pgstream/issues](https://github.com/xataio/pgstream/issues)
* Documentation: [https://github.com/xataio/pgstream/tree/main/docs](https://github.com/xataio/pgstream/tree/main/docs)
* Discussions: [https://github.com/xataio/pgstream/discussions](https://github.com/xataio/pgstream/discussions)
