The numbers in the error are specific to you, but if you see something like this, be sure to check if your indexes are somehow corrupted.
- In the console, type "\d tablename" to bring up the details.
- Under the table, you'll see a list of indexes.
- For each index, type "reindex INDEX indexname"
Try performing your query again.