Project

General

Profile

Feature #17251

Data type of the id on 'big' tables

Added by Nacho Barrientos almost 6 years ago. Updated almost 6 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Hi,

Could the id columns of tables that are meant to cycle data frequently (like logs, reports and fact_values) have by default a bigger datatype like BIGINT or at least, INT UNSIGNED? For a running service, would it be safe to alter the tables on the go or could that generate conflicts when upgrading Foreman (because of the DB migration scripts)?

In our case they're all of type INT as it was chosen by rails when the initial database was deployed. We have more than 25k nodes running Puppet every hour and we run out of ids way more often than we'd like to.

Maybe there's something that we can do at the time of deploying the application to do this w/o you having to patch anything. Please accept my apologies if that's the case and take this ticket as a question instead of a feature request :)

Thanks.


Related issues

Is duplicate of Foreman - Bug #13810: Reports fail to upload, Mysql2::Error: Out of range value for column 'id' (logs table)Closed2016-02-19

History

#1 Updated by Dominic Cleal almost 6 years ago

  • Is duplicate of Bug #13810: Reports fail to upload, Mysql2::Error: Out of range value for column 'id' (logs table) added

#2 Updated by Dominic Cleal almost 6 years ago

  • Status changed from New to Duplicate

This is tracked under ticket #13810 for logs, but can certainly apply to others. Changing the schema may break with future DB migrations, I can't recommend doing it - best to submit a patch to change the column type.

Also available in: Atom PDF