Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt
hiddentrue

Error PostgreSQL : This page is only necessary for customers under version 3.0.0.

Panel
bgColor#DEEBFF

Deprecated

This page is only necessary for customers under version 3.0.0.

If you are meeting this issue, the solution is most certainly to upgade to the latest version.

Tip

Nothing to do for MySQL, Microsoft SQL Server and Oracle

Only PostgreSQL may require an action here, if you reach 2 billion records.

Requirement Yogi 2.6.5 for Confluence, until 3.0.

Introduction

Prior to version 2.6.45, all our database records contained were identified by IDs which were limited to 2 billion rows.

In version 2.6.45, we have replaced, for one table, all the IDs with bigger numbers ("long" instead of "integer"). 've performed the first step of "upgrading" those IDs to the type "long", which supports an almost-infinite number of rows, for the table AO_32F7CE_AOINTEGRATION_QUEUE, which contains the messages sent to Jira.

In future versions, we will replace the IDs for other tables. We take it in several steps, because we want to ensure the change of type doesn't make some data inaccessible.

Known problems

After the installation of 2.6.4, there won't be any problem anymore for the number of records, in the table AOchange the rest of the tables.

As a database administrator, when should I act?

  • At the latest, you can wait for users to raise the issue. Unfortunately, it means pages will be saved but requirements won't be updated from the moment users meet the issue.

  • If you want to act early, we suggest you act when the ID "2 billion" is generated in the table AO_32F7CE_AOINTEGRATION_QUEUE

...

However, if you do reach the ID 2,000,000,000, the sequence that generates the ID in the database will have reached its maximum. It is not a problem anymore, since it is possible to update the sequence. However, you mst do it manually, as an administrator.

...

  • , since the limit is ~2.147 billion. You can check this using the tab "Usage metrics" in the Requirement Yogi administration.

  • It's just a sequence where you need to increase its max.

Expected error on PostgreSQL

Only for PostgreSQL, when you reach 2 billion records in the queue, PostgreSQL will refuse to insert new messages.

Users may come to you with an error such as "The requirements couldn't be reindexed for Requirement Yogi. (...) addToQueue()":Image Removed

...

Or you may see, in the logs, an error such as:

...

Then records are not saved anymore. You must update the sequence IDs.

How to fix in Postgres

The sequence named "AO_32F7CE_AOINTEGRATION_QUEUE_ID_seq" (quotes included) must be updated to generate bigger numberstype of the column is already "big integer" and doesn't need to be changed. It's only the sequence which needs to have its max increased:

Code Block
ALTER SEQUENCE "AO_32F7CE_AOINTEGRATION_QUEUE_ID_seq" AS bigint;
ALTER SEQUENCE "AO_32F7CE_AOINTEGRATION_QUEUE_ID_seq" MAXVALUE 9223372036854775807;

Tip

That is all

Only the table AO_32F7CE_AOINTEGRATION_QUEUE has this issue, from 2.6.5 on, and for PostgreSQL only.