Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-38813

ERROR: nextval: reached maximum value of sequence "logs_id_seq"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 6.16.5, 6.15.5.4
    • Upgrades
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      It was noted in foreman DB "logs_id_seq" out of numbers.

      Actual behavior:

      In our database:

       

      foreman=# \d+ logs
                                                             Table "public.logs"
         Column   |       Type        | Collation | Nullable |             Default              | Storage  | Stats target | Description 
      -------------------------------------------------------------------------------------------------+------------
       id         | bigint            |           | not null | nextval('logs_id_seq'::regclass) | plain    |              | 
       source_id  | integer           |           |          |                                  | plain    |              | 
       message_id | integer           |           |          |                                  | plain    |              | 
       report_id  | integer           |           |          |                                  | plain    |              | 
       level_id   | integer           |           |          |                                  | plain    |              | 
       result     | character varying |           |          |                                  | extended |              | 
      Indexes:
          "logs_pkey" PRIMARY KEY, btree (id)
          "index_logs_on_level_id" btree (level_id)
          "index_logs_on_message_id" btree (message_id)
          "index_logs_on_report_id" btree (report_id)
          "index_logs_on_result" btree (result)
          "index_logs_on_source_id" btree (source_id)
      Access method: heap
      foreman=# select * from pg_sequences where sequencename='logs_id_seq';
       schemaname | sequencename | sequenceowner | data_type | start_value | min_value | max_value  | increment_by | cycle | cache_size | last_value 
      -----------------------------------------------------------------------------------------------------------------
       public     | logs_id_seq  | foreman       | integer   |           1 |         1 | 2147483647 |            1 | f     |          1 |       1757
      (1 row)
      

       

      The datatype of id in logs table in bigint but the related sequence i.e. logs_id_seq is of integer type which should not be the case. 

      Expected behavior:
      logs_id_seq should be declared as bingint 

      Business Impact / Additional info:

      This issue can affect Satellite Upgrade to 6.17 ? To be more precise If the variable type will be changed manually from bingint to int after upgrade do It needs to change data type again? Will it be changed back to INT?

              Unassigned Unassigned
              rhn-support-gformisa Giovanni Formisano
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: