> Thanks for updating the patch! While reviewing yours, I found a corner case that > a recently deleted tuple cannot be detected when index scan is chosen. > This can happen when indices are re-built during the replication. > Unfortunately, I don't have any solutions for it.
I just randomly saw your message, so, I could be wrong and out of the context - so, sorry in advance.
But as far as I know, to solve this problem, we need to wait for slot.xmin during the [0] (WaitForOlderSnapshots) while creating index concurrently.