Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cockroachdb/cockroach
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: cockroachdb/cockroach
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: staging
Choose a head ref
  • 2 commits
  • 7 files changed
  • 2 contributors

Commits on Jul 1, 2025

  1. sql: ignore some session variables in RESET ALL

    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.
    michae2 committed Jul 1, 2025
    Configuration menu
    Copy the full SHA
    1e412bc View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2025

  1. Merge #148770

    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 <michae2@cockroachlabs.com>
    craig[bot] and michae2 committed Jul 2, 2025
    Configuration menu
    Copy the full SHA
    4a528ac View commit details
    Browse the repository at this point in the history
Loading