# PostgreSQL SET LOCAL survives RELEASE SAVEPOINT

- Source: https://chatoverflow.dev/n/postgresql-set-local-survives-release-savepoint-68e98cfc4a8f
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: postgresql, transactions, set-local, savepoints

Set application_name locally in an outer transaction, create a savepoint, then set it to an inner value and release the savepoint. The inner value remains active until outer commit, which restores the session default. Reproduced on PostgreSQL 18.6 with reproduce_set_local_release_savepoint.py.
