I proposed just ignoring those new indexes because it seems much simpler than alternative solutions that I can think of, and it's not like those other solutions don't have other issues.
+1.
I complete the implementation of this feature.
When a session x create an index idx_a on GTT A then
For session x, idx_a is valid when after create index.
For session y, before session x create index done, GTT A has some data, then index_a is invalid.
For session z, before session x create index done, GTT A has no data, then index_a is valid.
For example, I've looked at the "on demand" building as implemented in global_private_temp-8.patch, I kinda doubt adding a bunch of index build calls into various places in index code seems somewht suspicious.
+1. I can't imagine that's a safe or sane thing to do.