Skip to content

sql: transaction with schema change gets pushed consistently #21800

@andreimatei

Description

@andreimatei

It would appear that a transaction trying to do a schema change in a txn that has been running for a bit gets pushed consistently.
@vivekmenezes want this one?

CREATE TABLE s (a int primary key, b int);
INSERT INTO s VALUES (1, 1);
INSERT INTO s VALUES (2, 1);

root@:26257/t> begin;
Now adding input for a multi-line SQL transaction client-side.
Press Enter two times to send the SQL text collected so far to the server, or Ctrl+C to cancel.
You can also use \show to display the statements entered so far.
            ->
BEGIN

Time: 100.192µs

WAIT 10 seconds

root@:26257/t  OPEN> alter table s add constraint b_unique unique (b); commit;
pq: restart transaction: HandledRetryableTxnError: serializable transaction timestamp pushed (detected by SQL Executor)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions