PostgreSQL: Index contains unexpected zero page at block 0

Postgres logoThis is a short notice about a problem I recently faced using PostgreSQL 8.4.2. with Hibernate. I was not able to find out why it exacly occurs, but at least I provide a solution to you. I appreciate, if you can support this article with an explanation, why this error occurs.

Solution

If you receive the error message

Index "%" contains unexpected zero page at  block 0

where % presents any of your database indizes name, just re-index the index’s table. For me, this worked fine.

Open questions

If someone of you knows, why and when this error occurs, please write it down here in a comment. I am very interested.
All I actually know is, that in my case, the error mentioned above occured when persisting/committing my Hibernate session. But why?

Leave a Reply


2 + two =