> 22 авг. 2021 г., в 17:30, Andrey Borodin <x4mmm@yandex-team.ru> написал(а):
>
> I've observed few times that same Xid was WaitXact()'es twice. Is it possible that taking ShareLock on running xid
(takenfrom PGPGROC of vxid) is not a good way to wait for transaction completition?
> Is it possible that xid is in PGPROC before backend acquires its own lock on xid?
Oh, that's it. We first publish xid in PGPROC and only then take a lock in lock manager on it.
Ok, I know how to fix this.
Currently when testing combination of all fixes I observe things like
'error running SQL: 'psql:<stdin>:1: ERROR: prepared transaction with identifier "a" is busy''
Looks like kind of race condition in tests.
Thanks!
Best regards, Andrey Borodin.