Project

General

Profile

Actions

Bug #17270

closed

Running out of IDs in logs table

Added by Guilherme M. Schroeder over 7 years ago. Updated over 7 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hello,

I saw this on production.log:

2016-11-08 14:10:52 92eac1ed [sql] [D] SQL (1.0ms) INSERT INTO "logs" ("message_id", "source_id", "report_id", "level_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["message_id", 16056395], ["source_id", 2], ["report_id", 232689215], ["level_id", 4], ["created_at", "2016-11-08 13:10:52.062919"], ["updated_at", "2016-11-08 13:10:52.062919"]]
2016-11-08 14:10:52 92eac1ed [sql] [D] (0.1ms) ROLLBACK
2016-11-08 14:10:52 92eac1ed [app] [W] Action failed | PG::Error: ERROR: integer out of range
...

And checking the database, I've run out IDs in logs table:

foreman=# insert into logs (message_id, source_id, report_id, level_id, created_at, updated_at) values (16056395, 2, 232689215, 4, '2016-11-08 13:10:52.062919', '2016-11-08 13:10:52.062919');
ERROR: integer out of range

foreman=# select max(id) from logs;
max
------------
2147483647
(1 row)

Can we increase id column from integer to bigint?

Thanks.


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #13810: Reports fail to upload, Mysql2::Error: Out of range value for column 'id' (logs table)ClosedTimo Goebel02/19/2016Actions
Actions #1

Updated by Dominic Cleal over 7 years ago

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

Updated by Dominic Cleal over 7 years ago

  • Status changed from New to Duplicate

Thanks for the report, this is tracked under ticket #13810.

Actions

Also available in: Atom PDF