>Don't we need to add this only when the xid of current transaction is valid? Also, I think it will be better if we can explain why we need to add the our >own transaction id while caching the snapshot.
I have fixed the same thing and patch is attached.
Some more tests done after that
pgbench write tests: on 8 socket, 64 core machine.