You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
148770: sql: ignore some session variables in RESET ALL r=rafiss,yuzefovich a=michae2
Looking at `src/backend/utils/misc/guc_tables.c` in PG source code, there are a few session variables flagged with `GUC_NO_RESET_ALL` that should not be affected by RESET ALL. This commit adds a `NoResetAll` flag to the following session variables that overlap with PG:
- `is_superuser`
- `role`
- `session_authorization`
- `transaction_isolation`
- `transaction_read_only`
This commit also adds the flag to a couple CRDB-only session variables that seem similar:
- `transaction_priority`
- `transaction_status`
Most of these variables are read-only, and so were not affected by RESET ALL, but the new flag makes the intended behavior clear in case any of them do become writable in the future.
By fixing RESET ALL, this change also makes DISCARD ALL work correctly when `default_transaction_use_follower_reads` is enabled.
Fixes: #124150
Release note (bug fix): The RESET ALL statement is fixed to no longer affect the following session variables:
- `is_superuser`
- `role`
- `session_authorization`
- `transaction_isolation`
- `transaction_priority`
- `transaction_status`
- `transaction_read_only`
This better matches PostgreSQL behavior for RESET ALL.
By fixing RESET ALL, the DISCARD ALL statement is also fixed to work correctly when `default_transaction_use_follower_reads` is enabled.
Co-authored-by: Michael Erickson <[email protected]>
0 commit comments