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

How can I specify the num of partitions when creating table #1873

Closed
gdyang1990 opened this issue Jul 23, 2019 · 3 comments
Closed

How can I specify the num of partitions when creating table #1873

gdyang1990 opened this issue Jul 23, 2019 · 3 comments
Labels
community/request Issues created by external users kind/question This is a question

Comments

@gdyang1990
Copy link

gdyang1990 commented Jul 23, 2019

I noticed that a table will be partitioned into 32 tablets by default.
But how can I specify the num of partitions when creating a postgres table?
Is there any way?

And can partitions be adjusted automatically like range split in CockroachDB?

@yugabyte-ci yugabyte-ci added the community/request Issues created by external users label Jul 23, 2019
@schoudhury
Copy link
Contributor

Thanks for the question. You can specify the number of tablets (aka partitions/shards) only at a cluster level today and not at an individual table level (this is something we will enhance in the future).

The config flag that controls the number of tablets at cluster level is num_shards_per_tserver

You can set the flag directly on yb-server or via the yb-ctl local cluster utility.

@gdyang1990
Copy link
Author

@schoudhury thanks for reply.
And I want to know that can partitions be adjusted automatically like range split in CockroachDB?

@ttyusupov ttyusupov added the kind/question This is a question label Jul 24, 2019
@ttyusupov
Copy link
Contributor

@gdyang1990 , currently the number of partitions couldn't be adjusted after the table is created. But we have a splitting feature in WIP: #1004

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community/request Issues created by external users kind/question This is a question
Projects
None yet
Development

No branches or pull requests

4 participants