Does anyone know the reason, yugabyte-specific or otherwise, that I cannot alternate between truncating and inserting within the same transaction?
These steps:
- Truncate a table.
- Insert a row into that table.
- Truncate again.
- Insert another row into the table.
Result in this error on the final step:
ERROR: Operation failed. Try again.: Unknown transaction, could be recently aborted: e415ae05-0d46-42f5-b18d-f27b344b5642 (SQLSTATE 40001)
[Disclaimer]: This question was first asked on the YugabyteDB Community Slack channel.