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

Using bigint for MySQL/MariaDB id column #110

Open
bognerf opened this issue Nov 29, 2021 · 1 comment
Open

Using bigint for MySQL/MariaDB id column #110

bognerf opened this issue Nov 29, 2021 · 1 comment

Comments

@bognerf
Copy link

bognerf commented Nov 29, 2021

Since installing a K3s cluster (2 control panes, 3 workers) with MariaDB 10.3 as a datastore backend, I can see the id column incrementing faster than expected. After several weeks I already hit 65 milllion with about 6000 rows.
Of course, 65 mio is not 2 billion, which would be the maximum for a signed int column at MariaDB, but I wonder if it would be safe to change the column type of id, create_revision and prev_revision to bigint unsigned.

Could you think of unintended side effects or is there anything I'm not aware of that would make this undesirable?

@brandond
Copy link
Contributor

brandond commented Nov 29, 2021

I've not seen anyone run into issues with this, but it should be possible to change it without it negatively affecting anything. Note that if you are concerned about this now, you should be able to run an ALTER TABLE on the database to change it; kine won't make any attempt to revert it.

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