Open nlebovits opened 1 day ago
I'd love to take a shot at this one and get involved with the project in general. After talking last night and looking through the issue I'm starting to get a feel for it.
One caveat: I'll be out of town this weekend and won't be able to really sink my teeth into it until the latter part of next week. Will that be an issue?
Not an issue at all @rmartinsen ! I've assigned the ticket to you.
Add TimescaleDB Extension and Configure Hypertables for Time Series Analysis
Describe the Task
Our current PostgreSQL instance is not optimized for time series data. Currently, the script dumps the existing postgres schema into a backup schema named with the date it was created, and then creates a new data. Instead, we should switch to using a single schema with the
timescaledb
extension. Then we can convert our main tables to hypertables, partitioned monthly, instead of creating a bunch of backup schemas. Additionally, we want to implement data compression policies for data older than one year to optimize storage.As an optional improvement, consider adding spatial indexing to tables containing geospatial data. If this is implemented, please document the process and any decisions made.
Another optional but beneficial addition is setting up
pg_stat
to monitor query performance and track table growth over time.Acceptance Criteria
timescaledb
extension to the PostgreSQL instance.pg_stat
to monitor query performance and table growth over time.Additional Context
timescaledb
and PostgreSQL configurations for time series analysis.Existing Work
I've already put some work into this. Here is:
docker-compose.yml
Dockerfile
Dockerfile-pg
init_pq.sql
script.py
Please create a draft PR that includes strong documentation, including:
timescaledb
and the setup of hypertables.pg_stat
setup).