Skip to main content
idabouzi
Staff
Staff
February 21, 2025

Technical Tip: How to fix PostgreSQL 'ERROR: right sibling's left-link doesn't match:'

  • February 21, 2025
  • 0 replies
  • 912 views
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

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!