Skip to content

fix(sql): Remove retention policy from partman#164

Merged
devsjc merged 4 commits into
mainfrom
devsjc/retention-modification
May 19, 2026
Merged

fix(sql): Remove retention policy from partman#164
devsjc merged 4 commits into
mainfrom
devsjc/retention-modification

Conversation

@devsjc
Copy link
Copy Markdown
Contributor

@devsjc devsjc commented May 18, 2026

Contribution Checklist

  • Have you followed the Open Climate Fix Contribution Guidelines?
  • Have you referenced the Issue this PR addresses, where applicable?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added a summary of the changes?
  • Have you written new tests for your changes, where applicable?
  • Have you successfully run make lint with your changes locally?
  • Have you successfully run make test with your changes locally?

Warning

PRs may be closed if all the above boxes are not checked.

Changes in this Pull Request

Partman previously had the retention policy set to one month, but we
want to be able to query data that is older than that. This resets
partman to have no retention policy, and reattaches and detached
partitions from the affected tables.

devsjc added 2 commits May 18, 2026 15:07
Partman previously had the retention policy set to one month, but we
want to be able to query data that is older than that. This resets
partman to have no retention policy, and reattaches and detached
partitions from the affected tables.
@devsjc devsjc force-pushed the devsjc/retention-modification branch from d1162e2 to df3a4ad Compare May 18, 2026 14:13
peterdudfield
peterdudfield previously approved these changes May 18, 2026
@github-actions
Copy link
Copy Markdown

Benchmark Results

Benchmark results
?   	github.com/openclimatefix/data-platform/cmd	[no test files]
?   	github.com/openclimatefix/data-platform/internal/gen/ocf/dp	[no test files]
?   	github.com/openclimatefix/data-platform/internal/interceptors	[no test files]
PASS
ok  	github.com/openclimatefix/data-platform/internal/server/dummy	0.005s
{"level":"debug","time":"2026-05-18T17:26:11Z","message":"Completed migrations"}
goos: linux
goarch: amd64
pkg: github.com/openclimatefix/data-platform/internal/server/postgres
cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
BenchmarkPostgresClient/small/GetForecastAsTimeseries-4         	      62	  18483449 ns/op
BenchmarkPostgresClient/small/GetForecastAtTimestamp-4          	     280	   3945410 ns/op
BenchmarkPostgresClient/small/GetObservationsAsTimeseries-4     	    1064	   1063667 ns/op
BenchmarkPostgresClient/small/CreateForecast-4                  	      96	  11970752 ns/op
BenchmarkPostgresClient/small/StreamForecastData-4              	      12	  84265553 ns/op
PASS
ok  	github.com/openclimatefix/data-platform/internal/server/postgres	65.732s
?   	github.com/openclimatefix/data-platform/internal/server/postgres/gen	[no test files]

@devsjc devsjc requested a review from peterdudfield May 18, 2026 17:29
@devsjc devsjc merged commit 0de099d into main May 19, 2026
4 checks passed
@devsjc devsjc deleted the devsjc/retention-modification branch May 19, 2026 09:11
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.

2 participants