Project

General

Profile

Actions

Bug #4871

closed

Bug #4831: Reports cannot be inserted into postgresql due to a limit on ids

Migration SQL script to change the format of the ids from integer to bigint

Added by Nicolas CHARLES almost 10 years ago. Updated almost 10 years ago.

Status:
Released
Priority:
1
Category:
Web - Compliance & node report
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

This ticket is to create the SQL migration script to :
- rename the tables ruddersysevent to ruddersysevents_old, and create a new ruddersysevetns with bigint ids
- rename the tables archivedruddersysevent to archivedruddersysevents_old, and create a new archivedruddersysevetns with bigint ids

And another script to copy a specific number of reports from a node from the ruddersysevents_old to ruddersysevent

Actions #1

Updated by Nicolas CHARLES almost 10 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Ade Bradshaw to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/517
Actions #2

Updated by Nicolas CHARLES almost 10 years ago

  • Tracker changed from Enhancement to Bug
Actions #3

Updated by Christophe Nowicki almost 10 years ago

Hi Nicolas,

Maybe bigserial is better than bigint?

http://docs.postgresql.fr/8.1/datatype.html#datatype-serial

My 0.02 BTC

Actions #4

Updated by Nicolas CHARLES almost 10 years ago

Oh, good catch Christophe.

Actions #5

Updated by Nicolas CHARLES almost 10 years ago

Actually, there is no need to migrate the sequence:

rudder=> \d serial
           Sequence "public.serial" 
    Column     |  Type   |        Value        
---------------+---------+---------------------
 sequence_name | name    | serial
 last_value    | bigint  | 14566345
 start_value   | bigint  | 101
 increment_by  | bigint  | 1
 max_value     | bigint  | 9223372036854775807
 min_value     | bigint  | 1
 cache_value   | bigint  | 1
 log_cnt       | bigint  | 19
 is_cycled     | boolean | f
 is_called     | boolean | t

http://www.postgresql.org/docs/8.1/static/sql-createsequence.html
For once, default are sane in postgresql :)

Actions #6

Updated by Nicolas CHARLES almost 10 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #8

Updated by Vincent MEMBRÉ almost 10 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.10.1, which was released today.
Check out:

Actions

Also available in: Atom PDF