Skip to content

IcingadB 1.4.0 cleanup causes high database load #1003

@rezemble

Description

@rezemble

Describe the bug

A clear and concise description of what the bug is.

I've set up IcingaDB with a few thousand hosts and a postgres cluster as backend.

since the upgrade from 1.1.1 to 1.4.0, including applying all outstanding database migrations, icingadb runs regular cleanups of history tables, notification_history cleanup takes a very long time due to missing indexes on user_notification_history.

If I create the index manually (CREATE INDEX idx_user_notification_history_notification_history_id ON user_notification_history (notification_history_id);), the performance is back to normal and cleanups take just a few milliseconds. Is this index missing in migrations?

  • Icinga DB version: 1.4.0
  • Icinga 2 version: 2.15.0
  • Operating System and version: CentOS Stream 9

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions