Skip to content

CHECK index unique throw exception #93

@my-ship-it

Description

@my-ship-it

Root Cause Analysis

DirtySnapshot is created on stack, but will be recorded in Resowner.
If transaction abort, there is no chance to remove snapshot from resource owner anyway, which caused invalid memory access.

The stack trace:

_bt_check_unique(DirtySnapshot is created here)
   -> table_index_fetch_tuple_check
      -> ...
         -> AppendOnlyVisimapStore_Init
            -> RegisterSnapshot(snapshot)

UnregisterSnapshot is called in AppendOnlyVisimapStore_Finish. If transaction aborts, there is no chance to call AppendOnlyVisimapStore_Finish.

Reproduce steps

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions