Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: support SET LOCAL and txn-scoped session variable changes #32562

Closed
knz opened this issue Nov 22, 2018 · 15 comments · Fixed by #69224
Closed

sql: support SET LOCAL and txn-scoped session variable changes #32562

knz opened this issue Nov 22, 2018 · 15 comments · Fixed by #69224
Labels
A-sql-executor SQL txn logic A-sql-pgcompat Semantic compatibility with PostgreSQL C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) X-anchored-telemetry The issue number is anchored by telemetry references.

Comments

@knz
Copy link
Contributor

knz commented Nov 22, 2018

https://www.postgresql.org/docs/10/sql-set.html

The effects of SET LOCAL last only till the end of the current transaction, whether committed or not. A special case is SET followed by SET LOCAL within a single transaction: the SET LOCAL value will be seen until the end of the transaction, but afterwards (if the transaction is committed) the SET value will take effect.

The effects of SET or SET LOCAL are also canceled by rolling back to a savepoint that is earlier than the command.

This ticket also includes adding support for the set_config(setting_name, val, is_local) builtin: https://www.postgresql.org/docs/13/functions-admin.html

Epic CRDB-2507

@knz knz added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-sql-pgcompat Semantic compatibility with PostgreSQL A-sql-executor SQL txn logic labels Nov 22, 2018
@knz knz added the X-anchored-telemetry The issue number is anchored by telemetry references. label Nov 22, 2018
knz added a commit to knz/cockroach that referenced this issue Nov 22, 2018
knz added a commit to knz/cockroach that referenced this issue Nov 26, 2018
knz added a commit to knz/cockroach that referenced this issue Nov 28, 2018
@coco98
Copy link

coco98 commented Feb 25, 2019

Hi folks! Keen on having this supported. If possible, would love to know when this when this might land (roughly ofcourse).

@knz
Copy link
Contributor Author

knz commented Feb 25, 2019

What about you start by explaining why this is important to you:

  • why do you need this?
  • what is the use case?
  • what other options have you explored? what didn't work?

@coco98
Copy link

coco98 commented Feb 25, 2019

Sure! I'm one of the creators of Hasura and was exploring what it would take to support cockroach. :)

Our access control layer uses SET LOCAL for passing session variables (derived from the HTTP request) as context to some triggers (defined on "updatable" views in postgres).

An option on our end is to not use SET LOCAL, but that would make it harder to some of the underlying Postgres magic.

We can go into more detail if relevant to this issue.

@coco98
Copy link

coco98 commented Feb 25, 2019

Also, just wanted to add a note to the team that having the error message while connecting with a postgres client to point to the right issue on github is amazingly helpful. Thanks!

@knz
Copy link
Contributor Author

knz commented Feb 25, 2019

Thank you for your answer and your kind words!

  1. So I think it's unreasonable to focus on this one feature before you've made a larger-scale inventory of all the postgres features that your app/framework uses. Enabling tracing in postgres to create a SQL trace would be the first step, then go through that trace in CockroachDB to see what's supported and what isn't

  2. CockroachDB does not support triggers nor updatable views. It would be interesting to explore the "larger picture" and see what the framework is trying to achieve.

  3. CockroachDB does not support WITH RECURSIVE (recursive common table expressions, see sql: WITH RECURSIVE (recursive common table expressions) #21085) which are commonly used for graph databases.

Given points 2 and 3, maybe SET LOCAL is not the main concern here. Maybe a better strategy would be to create a dedicated CockroachDB back-end for Hasura.

Let us know what you think!

@coco98
Copy link

coco98 commented Feb 25, 2019

Thanks for your prompt response and for the breakdown. Will get back on this thread with any relevant thoughts!

jordanlewis added a commit to jordanlewis/cockroach that referenced this issue Oct 2, 2019
The spreadsheet we discussed is unwieldy - hard to edit and impossible to keep
up to date. If we write down blacklists in code, then we can use an approach
like this to always have an up to date aggregation.

So far it seems like there's just a lot of unknowns to categorize still.

The output today:

```
=== RUN   TestBlacklists
 648: unknown                                                (unknown)
 493: cockroachdb#5807   (sql: Add support for TEMP tables)
 151: cockroachdb#17511  (sql: support stored procedures)
  86: cockroachdb#26097  (sql: make TIMETZ more pg-compatible)
  56: cockroachdb#10735  (sql: support SQL savepoints)
  55: cockroachdb#32552  (multi-dim arrays)
  55: cockroachdb#26508  (sql: restricted DDL / DML inside transactions)
  52: cockroachdb#32565  (sql: support optional TIME precision)
  39: cockroachdb#243    (roadmap: Blob storage)
  33: cockroachdb#26725  (sql: support postgres' API to handle blob storage (incl lo_creat, lo_from_bytea))
  31: cockroachdb#27793  (sql: support custom/user-defined base scalar (primitive) types)
  24: cockroachdb#12123  (sql: Can't drop and replace a table within a transaction)
  24: cockroachdb#26443  (sql: support user-defined schemas between database and table)
  20: cockroachdb#21286  (sql: Add support for geometric types)
  18: cockroachdb#6583   (sql: explicit lock syntax (SELECT FOR {SHARE,UPDATE} {skip locked,nowait}))
  17: cockroachdb#22329  (Support XA distributed transactions in CockroachDB)
  16: cockroachdb#24062  (sql: 32 bit SERIAL type)
  16: cockroachdb#30352  (roadmap:when CockroachDB  will support cursor?)
  12: cockroachdb#27791  (sql: support RANGE types)
   8: cockroachdb#40195  (pgwire: multiple active result sets (portals) not supported)
   8: cockroachdb#6130   (sql: add support for key watches with notifications of changes)
   5: Expected Failure                                       (unknown)
   5: cockroachdb#23468  (sql: support sql arrays of JSONB)
   5: cockroachdb#40854  (sql: set application_name from connection string)
   4: cockroachdb#35879  (sql: `default_transaction_read_only` should also accept 'on' and 'off')
   4: cockroachdb#32610  (sql: can't insert self reference)
   4: cockroachdb#40205  (sql: add non-trivial implementations of FOR UPDATE, FOR NO KEY UPDATE, FOR SHARE, FOR NO KEY SHARE)
   4: cockroachdb#35897  (sql: unknown function: pg_terminate_backend())
   4: cockroachdb#4035   (sql/pgwire: missing support for row count limits in pgwire)
   3: cockroachdb#27796  (sql: support user-defined DOMAIN types)
   3: cockroachdb#3781   (sql: Add Data Type Formatting Functions)
   3: cockroachdb#40476  (sql: support `FOR {UPDATE,SHARE} {SKIP LOCKED,NOWAIT}`)
   3: cockroachdb#35882  (sql: support other character sets)
   2: cockroachdb#10028  (sql: Support view queries with star expansions)
   2: cockroachdb#35807  (sql: INTERVAL output doesn't match PG)
   2: cockroachdb#35902  (sql: large object support)
   2: cockroachdb#40474  (sql: support `SELECT ... FOR UPDATE OF` syntax)
   1: cockroachdb#18846  (sql: Support CIDR column type)
   1: cockroachdb#9682   (sql: implement computed indexes)
   1: cockroachdb#31632  (sql: FK options (deferrable, etc))
   1: cockroachdb#24897  (sql: CREATE OR REPLACE VIEW)
   1: pass?                                                  (unknown)
   1: cockroachdb#36215  (sql: enable setting standard_conforming_strings to off)
   1: cockroachdb#32562  (sql: support SET LOCAL and txn-scoped session variable changes)
   1: cockroachdb#36116  (sql: psychopg: investigate how `'infinity'::timestamp` is presented)
   1: cockroachdb#26732  (sql: support the binary operator: <int> / <float>)
   1: cockroachdb#23299  (sql: support coercing string literals to arrays)
   1: cockroachdb#36115  (sql: psychopg: investigate if datetimetz is being returned instead of datetime)
   1: cockroachdb#26925  (sql: make the CockroachDB integer types more compatible with postgres)
   1: cockroachdb#21085  (sql: WITH RECURSIVE (recursive common table expressions))
   1: cockroachdb#36179  (sql: implicity convert date to timestamp)
   1: cockroachdb#36118  (sql: Cannot parse '24:00' as type time)
   1: cockroachdb#31708  (sql: support current_time)
```

Release justification: non-production change
Release note: None
jordanlewis added a commit to jordanlewis/cockroach that referenced this issue Oct 24, 2019
The spreadsheet we discussed is unwieldy - hard to edit and impossible to keep
up to date. If we write down blacklists in code, then we can use an approach
like this to always have an up to date aggregation.

So far it seems like there's just a lot of unknowns to categorize still.

The output today:

```
=== RUN   TestBlacklists
 648: unknown                                                (unknown)
 493: cockroachdb#5807   (sql: Add support for TEMP tables)
 151: cockroachdb#17511  (sql: support stored procedures)
  86: cockroachdb#26097  (sql: make TIMETZ more pg-compatible)
  56: cockroachdb#10735  (sql: support SQL savepoints)
  55: cockroachdb#32552  (multi-dim arrays)
  55: cockroachdb#26508  (sql: restricted DDL / DML inside transactions)
  52: cockroachdb#32565  (sql: support optional TIME precision)
  39: cockroachdb#243    (roadmap: Blob storage)
  33: cockroachdb#26725  (sql: support postgres' API to handle blob storage (incl lo_creat, lo_from_bytea))
  31: cockroachdb#27793  (sql: support custom/user-defined base scalar (primitive) types)
  24: cockroachdb#12123  (sql: Can't drop and replace a table within a transaction)
  24: cockroachdb#26443  (sql: support user-defined schemas between database and table)
  20: cockroachdb#21286  (sql: Add support for geometric types)
  18: cockroachdb#6583   (sql: explicit lock syntax (SELECT FOR {SHARE,UPDATE} {skip locked,nowait}))
  17: cockroachdb#22329  (Support XA distributed transactions in CockroachDB)
  16: cockroachdb#24062  (sql: 32 bit SERIAL type)
  16: cockroachdb#30352  (roadmap:when CockroachDB  will support cursor?)
  12: cockroachdb#27791  (sql: support RANGE types)
   8: cockroachdb#40195  (pgwire: multiple active result sets (portals) not supported)
   8: cockroachdb#6130   (sql: add support for key watches with notifications of changes)
   5: Expected Failure                                       (unknown)
   5: cockroachdb#23468  (sql: support sql arrays of JSONB)
   5: cockroachdb#40854  (sql: set application_name from connection string)
   4: cockroachdb#35879  (sql: `default_transaction_read_only` should also accept 'on' and 'off')
   4: cockroachdb#32610  (sql: can't insert self reference)
   4: cockroachdb#40205  (sql: add non-trivial implementations of FOR UPDATE, FOR NO KEY UPDATE, FOR SHARE, FOR NO KEY SHARE)
   4: cockroachdb#35897  (sql: unknown function: pg_terminate_backend())
   4: cockroachdb#4035   (sql/pgwire: missing support for row count limits in pgwire)
   3: cockroachdb#27796  (sql: support user-defined DOMAIN types)
   3: cockroachdb#3781   (sql: Add Data Type Formatting Functions)
   3: cockroachdb#40476  (sql: support `FOR {UPDATE,SHARE} {SKIP LOCKED,NOWAIT}`)
   3: cockroachdb#35882  (sql: support other character sets)
   2: cockroachdb#10028  (sql: Support view queries with star expansions)
   2: cockroachdb#35807  (sql: INTERVAL output doesn't match PG)
   2: cockroachdb#35902  (sql: large object support)
   2: cockroachdb#40474  (sql: support `SELECT ... FOR UPDATE OF` syntax)
   1: cockroachdb#18846  (sql: Support CIDR column type)
   1: cockroachdb#9682   (sql: implement computed indexes)
   1: cockroachdb#31632  (sql: FK options (deferrable, etc))
   1: cockroachdb#24897  (sql: CREATE OR REPLACE VIEW)
   1: pass?                                                  (unknown)
   1: cockroachdb#36215  (sql: enable setting standard_conforming_strings to off)
   1: cockroachdb#32562  (sql: support SET LOCAL and txn-scoped session variable changes)
   1: cockroachdb#36116  (sql: psychopg: investigate how `'infinity'::timestamp` is presented)
   1: cockroachdb#26732  (sql: support the binary operator: <int> / <float>)
   1: cockroachdb#23299  (sql: support coercing string literals to arrays)
   1: cockroachdb#36115  (sql: psychopg: investigate if datetimetz is being returned instead of datetime)
   1: cockroachdb#26925  (sql: make the CockroachDB integer types more compatible with postgres)
   1: cockroachdb#21085  (sql: WITH RECURSIVE (recursive common table expressions))
   1: cockroachdb#36179  (sql: implicity convert date to timestamp)
   1: cockroachdb#36118  (sql: Cannot parse '24:00' as type time)
   1: cockroachdb#31708  (sql: support current_time)
```

Release justification: non-production change
Release note: None
craig bot pushed a commit that referenced this issue Nov 7, 2019
41252: roachtest: add test that aggregates orm blacklist failures r=jordanlewis a=jordanlewis

The spreadsheet we discussed is unwieldy - hard to edit and impossible to keep
up to date. If we write down blacklists in code, then we can use an approach
like this to always have an up to date aggregation.

So far it seems like there's just a lot of unknowns to categorize still.

The output today:

```
=== RUN   TestBlacklists
 648: unknown                                                (unknown)
 493: #5807   (sql: Add support for TEMP tables)
 151: #17511  (sql: support stored procedures)
  86: #26097  (sql: make TIMETZ more pg-compatible)
  56: #10735  (sql: support SQL savepoints)
  55: #32552  (multi-dim arrays)
  55: #26508  (sql: restricted DDL / DML inside transactions)
  52: #32565  (sql: support optional TIME precision)
  39: #243    (roadmap: Blob storage)
  33: #26725  (sql: support postgres' API to handle blob storage (incl lo_creat, lo_from_bytea))
  31: #27793  (sql: support custom/user-defined base scalar (primitive) types)
  24: #12123  (sql: Can't drop and replace a table within a transaction)
  24: #26443  (sql: support user-defined schemas between database and table)
  20: #21286  (sql: Add support for geometric types)
  18: #6583   (sql: explicit lock syntax (SELECT FOR {SHARE,UPDATE} {skip locked,nowait}))
  17: #22329  (Support XA distributed transactions in CockroachDB)
  16: #24062  (sql: 32 bit SERIAL type)
  16: #30352  (roadmap:when CockroachDB  will support cursor?)
  12: #27791  (sql: support RANGE types)
   8: #40195  (pgwire: multiple active result sets (portals) not supported)
   8: #6130   (sql: add support for key watches with notifications of changes)
   5: Expected Failure                                       (unknown)
   5: #23468  (sql: support sql arrays of JSONB)
   5: #40854  (sql: set application_name from connection string)
   4: #35879  (sql: `default_transaction_read_only` should also accept 'on' and 'off')
   4: #32610  (sql: can't insert self reference)
   4: #40205  (sql: add non-trivial implementations of FOR UPDATE, FOR NO KEY UPDATE, FOR SHARE, FOR NO KEY SHARE)
   4: #35897  (sql: unknown function: pg_terminate_backend())
   4: #4035   (sql/pgwire: missing support for row count limits in pgwire)
   3: #27796  (sql: support user-defined DOMAIN types)
   3: #3781   (sql: Add Data Type Formatting Functions)
   3: #40476  (sql: support `FOR {UPDATE,SHARE} {SKIP LOCKED,NOWAIT}`)
   3: #35882  (sql: support other character sets)
   2: #10028  (sql: Support view queries with star expansions)
   2: #35807  (sql: INTERVAL output doesn't match PG)
   2: #35902  (sql: large object support)
   2: #40474  (sql: support `SELECT ... FOR UPDATE OF` syntax)
   1: #18846  (sql: Support CIDR column type)
   1: #9682   (sql: implement computed indexes)
   1: #31632  (sql: FK options (deferrable, etc))
   1: #24897  (sql: CREATE OR REPLACE VIEW)
   1: pass?                                                  (unknown)
   1: #36215  (sql: enable setting standard_conforming_strings to off)
   1: #32562  (sql: support SET LOCAL and txn-scoped session variable changes)
   1: #36116  (sql: psychopg: investigate how `'infinity'::timestamp` is presented)
   1: #26732  (sql: support the binary operator: <int> / <float>)
   1: #23299  (sql: support coercing string literals to arrays)
   1: #36115  (sql: psychopg: investigate if datetimetz is being returned instead of datetime)
   1: #26925  (sql: make the CockroachDB integer types more compatible with postgres)
   1: #21085  (sql: WITH RECURSIVE (recursive common table expressions))
   1: #36179  (sql: implicity convert date to timestamp)
   1: #36118  (sql: Cannot parse '24:00' as type time)
   1: #31708  (sql: support current_time)
```

Release justification: non-production change
Release note: None

Co-authored-by: Jordan Lewis <[email protected]>
@nadilas
Copy link

nadilas commented Apr 19, 2020

@coco98 @knz has there been any consensus on whether cockroachdb will support hasura or not?

@knz
Copy link
Contributor Author

knz commented Apr 20, 2020

@nadilas this is not the right place to discuss hasura support. This issue is specifically about the SET LOCAL statement in SQL.

(You should post a comment on the hasura repository, not here.)

@rafiss
Copy link
Collaborator

rafiss commented Apr 24, 2020

@nadilas you may be interested in following this issue: hasura/graphql-engine#678

@chriscasano
Copy link

FWIW - A customer and myself investigated using PostgREST with CockroachDB. We both ran into this issue today:

{"hint":"You have attempted to use a feature that is not yet implemented.\nSee: https://github.com/cockroachdb/cockroach/issues/32562","details":"source SQL:\nset local schema ''\n ^","code":"0A000","message":"at or near "schema": syntax error: unimplemented: this syntax"}
Attempting to connect to the database...

@aeneasr
Copy link

aeneasr commented Feb 15, 2021

Just wanted to chime in that we are currently hitting this. The problem is that we are trying to apply migrations for several deployments, which are scoped by the search path. The migrations are written in plain SQL without prefixes/search path (e.g. CREATE TABLE foo .... The idea is to run each migration in its own search path as we have no way of customizing the SQL statements/migrations.

Without SET LOCAL, we have to open a new connection with an explicit session-scoped search path, instead of doing:

begin transaction;
set local search_path to scope_1, public;
create table "asdf" ("bar" varchar (14) not null);
commit;
begin transaction;
set local search_path to scope_2, public;
create table "asdf" ("bar" varchar (14) not null);
commit;
begin transaction;
set local search_path to scope_3, public;
create table "asdf" ("bar" varchar (14) not null);
commit;

This causes a lot of overhead and strain on system resources as we need to check if the db connection is healthy, allocate a new pool, block connections on crdb nodes, and so on.

Having SET LOCAL support - especially for the search path - would be tremendously helpful in reducing crdb system load and overall latencies.

@rafiss rafiss added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label May 12, 2021
@rafiss
Copy link
Collaborator

rafiss commented Aug 5, 2021

These docs are a useful reference on how Postgres implements this: https://github.com/postgres/postgres/blob/master/src/backend/utils/misc/README

In the "Saving/Restoring GUC Variable Values" section:

Prior values of configuration variables must be remembered in order to deal
with several special cases: RESET (a/k/a SET TO DEFAULT), rollback of SET
on transaction abort, rollback of SET LOCAL at transaction end (either
commit or abort), and save/restore around a function that has a SET option.
RESET is defined as selecting the value that would be effective had there
never been any SET commands in the current session.

To handle these cases we must keep track of many distinct values for each
variable.  The primary values are:

* actual variable contents	always the current effective value

* reset_val			the value to use for RESET

(Each GUC entry also has a boot_val which is the wired-in default value.
This is assigned to the reset_val and the actual variable during
InitializeGUCOptions().  The boot_val is also consulted to restore the
correct reset_val if SIGHUP processing discovers that a variable formerly
specified in postgresql.conf is no longer set there.)

In addition to the primary values, there is a stack of former effective
values that might need to be restored in future.  Stacking and unstacking
is controlled by the GUC "nest level", which is zero when outside any
transaction, one at top transaction level, and incremented for each
open subtransaction or function call with a SET option.  A stack entry
is made whenever a GUC variable is first modified at a given nesting level.
(Note: the reset_val need not be stacked because it is only changed by
non-transactional operations.)

A stack entry has a state, a prior value of the GUC variable, a remembered
source of that prior value, and depending on the state may also have a
"masked" value.  The masked value is needed when SET followed by SET LOCAL
occur at the same nest level: the SET's value is masked but must be
remembered to restore after transaction commit.

During initialization we set the actual value and reset_val based on
whichever non-interactive source has the highest priority.  They will
have the same value.

The possible transactional operations on a GUC value are:

Entry to a function with a SET option:

	Push a stack entry with the prior variable value and state SAVE,
	then set the variable.

Plain SET command:

	If no stack entry of current level:
		Push new stack entry w/prior value and state SET
	else if stack entry's state is SAVE, SET, or LOCAL:
		change stack state to SET, don't change saved value
		(here we are forgetting effects of prior set action)
	else (entry must have state SET+LOCAL):
		discard its masked value, change state to SET
		(here we are forgetting effects of prior SET and SET LOCAL)
	Now set new value.

SET LOCAL command:

	If no stack entry of current level:
		Push new stack entry w/prior value and state LOCAL
	else if stack entry's state is SAVE or LOCAL or SET+LOCAL:
		no change to stack entry
		(in SAVE case, SET LOCAL will be forgotten at func exit)
	else (entry must have state SET):
		put current active into its masked slot, set state SET+LOCAL
	Now set new value.

We may not be able to implement this exactly the same way, since Plain SET commands in CRDB do not respect transaction boundaries [1], but the basic approach might be the one we take.

[1]: What I mean by "respecting transaction boundaries" is this behavior in Postgres:

rafiss@127:postgres> show application_name;
+--------------------+
| application_name   |
|--------------------|
| pgcli              |
+--------------------+
SHOW

rafiss@127:postgres> begin;
BEGIN

rafiss@127:postgres> set application_name = 'a';
SET

rafiss@127:postgres> rollback;
ROLLBACK

rafiss@127:postgres> show application_name;
+--------------------+
| application_name   |
|--------------------|
| pgcli              |
+--------------------+
SHOW

Whereas in CRDB:

root@:26257/defaultdb> show application_name;
  application_name
--------------------
  $ cockroach sql
(1 row)

root@:26257/defaultdb> begin;
BEGIN

root@:26257/defaultdb  OPEN> set application_name = 'a';
SET

root@:26257/defaultdb  OPEN> rollback;
ROLLBACK

root@:26257/defaultdb> show application_name;
  application_name
--------------------
  a
(1 row)

@mgartner
Copy link
Collaborator

mgartner commented Aug 10, 2021

We recently came across a good use-case for a txn-scoped session settings: turning off distsql for a particular query. Because SET distsql=off does not revert to its previous value in an explicit txn ROLLBACK, the setting could "leak" to subsequent queries if the transaction fails:

[email protected]:26257/defaultdb> SHOW distsql;
  distsql
-----------
  auto
(1 row)

[email protected]:26257/defaultdb> BEGIN;
BEGIN

[email protected]:26257/defaultdb  OPEN> SET distsql=off;
SET

[email protected]:26257/defaultdb  OPEN> SELECT * FROM foo;
ERROR: relation "foo" does not exist
SQLSTATE: 42P01

[email protected]:26257/? ERROR> ROLLBACK;
ROLLBACK

[email protected]:26257/defaultdb> SHOW distsql;
  distsql
-----------
  off

@knz
Copy link
Contributor Author

knz commented Aug 11, 2021

We may not be able to implement this exactly the same way, since Plain SET commands in CRDB do not respect transaction boundaries

NB that since we implemented nested transactions, the conn executor now has a stack-like data structure to remember the name of nested transactions. We could thus piggy back this new mechanism to store the txn-scoped session var customizations.

craig bot pushed a commit that referenced this issue Aug 25, 2021
69338: sessiondata: introduce sessiondata.Stack and thread to EvalContext and connExecutor r=rafiss a=otan

See individual commits for details. This one is needed ASAP to prevent merge conflicts.
Part 1 of a series of PRs to merge SET LOCAL.
Refs: #32562

Release justification: low risk, high pri change.


Co-authored-by: Oliver Tan <[email protected]>
@rafiss
Copy link
Collaborator

rafiss commented Aug 26, 2021

#69396 is the issue for tracking SET not being transactional.

craig bot pushed a commit that referenced this issue Aug 26, 2021
69394: sql: refactor sessionDataMutator as sessionDataMutatorIterator r=rafiss a=otan

Part of a body of work for SET LOCAL (refs #32562)

See individual commits for details.

Release justification: high pri work

Co-authored-by: Oliver Tan <[email protected]>
craig bot pushed a commit that referenced this issue Aug 27, 2021
69224: sql: implement SET LOCAL r=rafiss a=otan

Resolves: #32562
Release justification: high priority bug fix

First 3 commits from #69394

Co-authored-by: Oliver Tan <[email protected]>
@craig craig bot closed this as completed in 4bc79bc Aug 27, 2021
craig bot pushed a commit that referenced this issue Aug 30, 2021
69480: sql: set_config builtin supports local=true r=otan a=rafiss

refs #32562

Now that SET LOCAL is implemented, this builtin can be supported.

Release justification: low-risk update to new functionality.
Release note (sql change): The set_config builtin function now allows
the `local` parameter to be true. This is the same as using SET LOCAL.

Co-authored-by: Rafi Shamim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-executor SQL txn logic A-sql-pgcompat Semantic compatibility with PostgreSQL C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) X-anchored-telemetry The issue number is anchored by telemetry references.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants