0

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.
snakecharmerb
57.2k13 gold badges137 silver badges201 bronze badges
asked Apr 19, 2024 at 8:28

1 Answer 1

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.

answered Mar 26, 2025 at 10:41
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.