FortiSIEM
FortiSIEM provides Security Information and Event Management (SIEM) and User and Entity Behavior Analytics (UEBA)
idabouzi
Staff
Staff
Article Id 378058
Description This article describes how to resolve PostgreSQL 'ERROR: right sibling's left-link doesn't match:'
Scope FortiSIEM.
Solution

This error might occur in case of database corruption.

 

Example:

 

< 2025-02-01 01:00:03.667 GMT >ERROR: right sibling's left-link doesn't match: block 52 links to 232 instead of expected 236 in index "pg_depend_depender_index"
< 2025-02-01 01:00:03.667 GMT >CONTEXT: SQL statement "CREATE TABLE ph_incident_y2025m2 (PRIMARY KEY (id), UNIQUE (incident_id), CHECK ( (FIRST_SEEN_TIME >= 1738368000000) AND (FIRST_SEEN_TIME < 1740787200000))) INHERITS (ph_incident)"


In this particular example, the error is preventing the creation of the ph_incident_y2025m2 table.

Rebuilding the index should fix the issue.

 

In this example, the index that needs to be rebuilt is 'pg_depend_depender_index'.

 

ssh to Super
# psql -U phoenix -d phoenixdb
# REINDEX INDEX pg_depend_depender_index;

=> Output:
REINDEX

 

Then restart PostgreSQL.

 

systemctl stop postgresql-13.service
systemctl start postgresql-13.service
systemctl status postgresql-13.service

 

Check the Postgresql logs to make sure the errors are no longer there:

 

vi /cmdb/data/pg_log/postgresql.log