Skip to content

Conversation

@nikolaik
Copy link

@nikolaik nikolaik commented Aug 4, 2025

Hi 👋

This is a proposed fix for initial creation of partitions when there is existing data.

We hit the following error:

codecov django.db.utils.IntegrityError: updated partition constraint for default partition "user_measurements_default" would be violated by some row

We beleieve this is because python manage.py pgmigrate was not run on startup, only python manage.py migrate, also the task to create new partitions was not run

Advice on the internet suggests creating partitions in advance, outside of the current time unit window.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@nikolaik nikolaik marked this pull request as ready for review August 5, 2025 08:55
This fixes initial creation of partitions when there is existing data
@nikolaik nikolaik force-pushed the nikolaik/next-time-unit branch from 952856f to e6a0279 Compare August 5, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant