I was running some SQL query and got the error:
sqlalchemy.exc.InternalError: (psycopg2.errors.InternalError_) the query contains a join that requires repartitioning HINT: Set citus.enable_repartition_joins to on to enable repartitioning
So, I tried enabling enable_repartition_joins in citus using:
SET citus.enable_repartition_joins = on;
but when I run SHOW citus.enable_repartition_joins; it results off.
Any possible reason why could this be happening?
Tried Methods:
- Restarting Postgres didn't help.
- The queries don't show any error while execution.
- The user is "postgres" i.e super admin
postgres -c "psql -p 9700 -U postgres -c 'SET citus.enable_repartition_joins = on;'"Tried this command as well.
1 Answer 1
You should use ALTER SYSTEM to change the configuration parameter accross the cluster, and then reload the server configuration for the changes to take effect.
ALTER SYSTEM SET citus.enable_repartition_joins = on;
SELECT pg_reload_conf();
SET citus.enable_repartition_joins = on; will only work for the current session and once you exit that session, it will go back to its system value, which is off.