Skip to content

Update PK sequence value to 2**31 in clean-up step, not swap #49

@timb07

Description

@timb07

In #47, special handling for the edge case of a bigint conversion where the PK sequence has been set to negative (presumably after positive PK values were exhausted) was added. In that case, the sequence is reset to the first positive bigint value not within the integer range, which is 2**31; this happens during the swap step.

However, switching to PK values that exceed the integer range during the swap step means that the trigger that keeps the old table (which has an integer PK) updated will fail.

To address this, the sequence value needs to be updated from negative to 2**31 during the cleanup step, after the old table and update trigger function have been dropped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions