[GH-ISSUE #2912] Policy_rules rows are not deleted in database #6402

Open
opened 2026-08-05 01:08:08 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @maigl on GitHub (Nov 19, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/2912

Describe the problem

I noticed that for every policy I get one entry in the policies table and one entry in the policy_rules table. If I delete the policy, the entry from the policies table is removed, but not from the policy_rules table. As I create and delete many many policies I have a table that grows and grows.

To Reproduce

  1. create a policy
  2. check size of policies table, it grows by 1
  3. check size of policy_rules table, it grows by 1
  4. delete policy
  5. check size of policies table, it shrinks by 1
  6. check size of policy_rules table, it NOT shrinks by 1

Expected behavior

I expect to not have a table that grows forever.

Are you using NetBird Cloud?

no

NetBird version

0.32.0

Originally created by @maigl on GitHub (Nov 19, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/2912 **Describe the problem** I noticed that for every policy I get one entry in the `policies` table and one entry in the `policy_rules` table. If I delete the policy, the entry from the `policies` table is removed, but not from the `policy_rules` table. As I create and delete many many policies I have a table that grows and grows. **To Reproduce** 1. create a policy 2. check size of policies table, it grows by 1 3. check size of policy_rules table, it grows by 1 4. delete policy 5. check size of policies table, it shrinks by 1 6. check size of policy_rules table, it NOT shrinks by 1 **Expected behavior** I expect to not have a table that grows forever. **Are you using NetBird Cloud?** no **NetBird version** 0.32.0
saavagebueno added the management-servicewaiting-feedback labels 2026-08-05 01:08:08 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#6402