Skip to content

VACUUM for ModifyColumnMigration should not be done at full speed #109

Description

@jonathanjouty

The implementation for ModifyColumnMigration uses a VACUUM step but this is done at "full speed", and it should ideally be slowed down so that it does not overwhelm the database being operated on.

This can be achieved using Cost-based Vacuum Delay (Note: the documentation's introductory paragraph to those PostgreSQL parameters are worth reading). In particular vacuum_cost_delay needs to be non-zero to enable this feature on a manual VACUUM (for clarity: and that is what we are doing in the implementation).

Chatting to @marco44, these values should ideally be inferred from the table's equivalent autovacuum_* values, as these are assumed to be safe (in terms of low risk of DB performance degradation). However, they can be -1 (which implies using the vacuum_* values instead) and so this needs to be checked rather than blindly copied.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions