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

Conditionally extend MAX_RANKs to 4-byte integer range for PostgreSQL #108

Closed
wants to merge 1 commit into from

Conversation

bnauta
Copy link
Contributor

@bnauta bnauta commented Apr 26, 2016

MAX_RANK_VALUE and MIN_RANK_VALUE are set to MySQL's 3-byte MEDIUMINT range by default. However, as PostgreSQL doesn't have a 3-byte integer data type and Postgres users are forced into allocating a 4-byte integer anyway, we may as well use the full 4-byte range to reduce the chance of potentially expensive rebalancing.

For reference:
Signed 4-byte INTEGER in PostgreSQL: -2147483648 to +2147483647
Signed 3-byte MEDIUMINT in MySQL: -8388607 to +8388607
SQLite3 allocates space according to size of each value, so we'll stick with the defaults.

@mixonic
Copy link
Contributor

mixonic commented Apr 29, 2016

Closed in favor of #109. @bnauta sorry there is so much effort that was set aside after this, but thank you for the contribution

@mixonic mixonic closed this Apr 29, 2016
@bnauta
Copy link
Contributor Author

bnauta commented May 1, 2016

@mixonic np!

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

Successfully merging this pull request may close these issues.

2 participants