You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are currently evaluating partitioned tables in Postgres for use with our logging database backing a Django application (large volume of log entries that are typically filtered by date, but we only keep six months worth of data). However, one of our requirements is being able to filter log entries out based on user access (users can share access with other users), and doing a many-to-many lookup table alongside the partitioned table seemed like a sensible approach to support this.
However, if we are understanding the Postgres documentation correctly, in order to make foreign key relationships into a partitioned table, the table needs to have a composite primary key that includes the date column used to establish the partition ranges. This is problematic because Django does not support composite primary keys.
Are there any known workarounds to allow this with django-postgres-extra?
I reviewed the documentation and checked other issues, but didn't find anything specifically relevant to this (#178 was the closest related issue I located), so any guidance is appreciated!
The text was updated successfully, but these errors were encountered:
We are currently evaluating partitioned tables in Postgres for use with our logging database backing a Django application (large volume of log entries that are typically filtered by date, but we only keep six months worth of data). However, one of our requirements is being able to filter log entries out based on user access (users can share access with other users), and doing a many-to-many lookup table alongside the partitioned table seemed like a sensible approach to support this.
However, if we are understanding the Postgres documentation correctly, in order to make foreign key relationships into a partitioned table, the table needs to have a composite primary key that includes the date column used to establish the partition ranges. This is problematic because Django does not support composite primary keys.
Are there any known workarounds to allow this with django-postgres-extra?
I reviewed the documentation and checked other issues, but didn't find anything specifically relevant to this (#178 was the closest related issue I located), so any guidance is appreciated!
The text was updated successfully, but these errors were encountered: