Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to replicate reference tables to coordinator #1053

Open
crabhi opened this issue Jun 22, 2022 · 2 comments
Open

Document how to replicate reference tables to coordinator #1053

crabhi opened this issue Jun 22, 2022 · 2 comments

Comments

@crabhi
Copy link

crabhi commented Jun 22, 2022

Hi, we're preparing a POC to migrate an existing Postgres database to Citus for further scaling. We have a few tables we designated reference. They're also used together with many tables that will stay local to the coordinator. Some of the queries are very inefficient if they have to run in the distributed mode.

Therefore, I wondered why it wasn't possible to keep one reference table copy at the coordinator. I stumbled upon citusdata/citus#1615 and citusdata/citus#3155. Calling master_add_node indeed seems to solve our issues but I can't find any documentation about that function since v6. If I understand it correctly, it's an alias for citus_add_node, right?

It surprised me this behaviour of reference tables wasn't the default. Are there any drawbacks to calling citus_add_node with the coordinator address and groupId => 0 apart from the reference tables storage requirements? It would be great if this use case was documented.

@onderkalaci
Copy link
Member

f I understand it correctly, it's an alias for citus_add_node, right?

Yes, we are deprecating APIs starting with master_, so suggest using citus_add_node(..., groupid:=0) or citus_set_coordinator_host: https://docs.citusdata.com/en/v11.0/develop/api_udf.html#set-coordinator-host

I agree that this could be documented somewhere here: https://docs.citusdata.com/en/v11.0/develop/reference_ddl.html?highlight=reference%20table#reference-tables

It surprised me this behaviour of reference tables wasn't the default.

We plan to do soon: citusdata/citus#5756

Moving the issue to Citus docs for visibility.

@onderkalaci onderkalaci transferred this issue from citusdata/citus Jun 23, 2022
@crabhi
Copy link
Author

crabhi commented Jun 23, 2022

Oh, great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants