PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> When we upgraded Postgres from 9.3.12 to 9.6.12 we observed that queries
> like the following are no longer giving the expected results.
> select * from xyz.job_attr where jobid = 'foo';
> [ but reindexing fixed it ]
What collation locale do you use in that database? (psql \l's
"Collate" column would say.) If it's not "C", the most likely
explanation is that you also upgraded the underlying OS, and glibc's
sort order for that locale changed from what it was before. If so,
reindexing is the appropriate cure. There isn't a lot we can do about
this inside Postgres, because we have no visibility into whether a
locale's behavior is different today than it was yesterday :-(
regards, tom lane