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

[Docs] clarify that truncate is not transactional #8528

Closed
polarweasel opened this issue May 19, 2021 · 0 comments · Fixed by #17182
Closed

[Docs] clarify that truncate is not transactional #8528

polarweasel opened this issue May 19, 2021 · 0 comments · Fixed by #17182
Assignees
Labels
area/documentation Documentation needed temp/docs-migration TEMPORARY USE for migrating docs tickets to Jira

Comments

@polarweasel
Copy link
Contributor

From Kannan:

for DDLs and operations like truncate, we currently need them to be their own independent transactions. Postgres for example allows multiple DDLs also to be executed in same transaction but with YugabyteDB that's a restriction.

Oracle also for example, multi-DDL transactions aren't supported. Each DDL auto-commits.

The bottom line is that 'truncate' in our current implementation is not transactional.

We recommend against using:
a) truncate inside of a multi-step transaction
b) or running truncate concurrently with our read/write operations in the same table.

If this is mostly for CI/CD on smaller datasets, can you instead just use:
delete from T;
This is heavier weight (and also not recommended for very large data sets) but will be transactional.

@polarweasel polarweasel added the area/documentation Documentation needed label May 19, 2021
@polarweasel polarweasel self-assigned this May 19, 2021
@polarweasel polarweasel added this to Backlog in Documentation via automation May 19, 2021
@polarweasel polarweasel added the temp/docs-migration TEMPORARY USE for migrating docs tickets to Jira label Feb 4, 2023
@ddorian ddorian assigned ddorian and unassigned polarweasel May 5, 2023
Documentation automation moved this from Backlog to Done May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Documentation needed temp/docs-migration TEMPORARY USE for migrating docs tickets to Jira
Projects
2 participants