It seems (but I can't tell for sure) that after I added a postgis indexed column (USING gist) to my database last week, I have been seeing a lot of those errors:

ERROR: tuple offset out of range: 0

The errors occur on all kinds of queries, also some that does not use those columns, and hence shouldn't use that index right?

Anyways my question is: What does that error message mean, and could it have something to do with postgis, or am I off track?

I'm on postgresql 9.3 and postgis 2.1

  • Does rebuilding the index (or even all indexes on the table) help? – a_horse_with_no_name Mar 9 '14 at 10:28
  • Looks like it's failing a TID bitmap sanity check in src/backend/nodes/tidbitmap.c. So I suspect you may have a damaged visibilty map or freespace map for the relation. A CLUSTER or VACUUM FULL is probably wise. – Craig Ringer Mar 9 '14 at 11:19
  • Thanks - but I have no idea what that means still - I'll try a vacuum full as suggested. Why might this have happened? – Niels Kristian Mar 9 '14 at 23:36
  • Okay it worked, it solved the problem. The issue started to occur out of "nothing" the other day (the new postgis indexes had been running for several days before). Can you by any means give me a hint on what might have caused this, so I can try to prevent having downtime doing a VACUUM FULL again? – Niels Kristian Mar 10 '14 at 8:28

It was all caused by the bug described and fixed in this release: http://www.postgresql.org/about/news/1506/

It caused us a lot of trouble!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.