Closed maziar-dandc closed 2 years ago
Moved the issue to citus issues board as it doesn't seem to be django's fault, and also, removing the FROM "appname_tablename"
didn't help.
Thinking of just undistributing the reference table before loaddata and then redistributing it again afterwards, only used for dev environment so should be ok.
sequence_reset_sql needs to be modified to remove
FROM "appname_tablename"
from the SQL query if the model is a reference/distributed table.taken from: https://github.com/django/django/blob/f5233dce309543c826224be9dfa9c9f4f855f73c/django/db/backends/postgresql/operations.py#L183
If there is a way to easily check if a model is a distributed/reference table, then this can be easily worked around.