In my setup I have one main and two replicas PostgreSQL-13 servers. On the main and one of the replica servers I have the following (normal) situation when running queries:
SELECT id, field FROM table WHERE table.field = 'some.string';
id | field
--------+-----------------
555555 | some.string
(1 row)
SELECT id, field FROM table WHERE table.field LIKE 'some.string';
id | field
--------+-----------------
555555 | some.string
(1 row)
But on the second replica server, I have the following situation, which I can't call normal:
SELECT id, field FROM table WHERE table.field = 'some.string';
id | field
--------+-----------------
(0 rows)
SELECT id, field FROM table WHERE table.field LIKE 'some.string';
id | field
--------+-----------------
(0 rows)
SELECT id, field FROM table WHERE table.field LIKE '%some.string';
id | field
--------+-----------------
555555 | some.string
(1 row)
SELECT id, field FROM table WHERE table.field LIKE 'some.string%';
id | field
--------+-----------------
555555 | some.string
(1 row)
Servers are in sync, sync state and lsn number are the same. I tried to rebuild index for this field (it is unique) on the main server and it did not help. Compared all collations and locales on the systems and could not find any difference. Stuck now. Want to drop index and create, but still not sure it may help.