diff options
author | Thomas Munro <tmunro@postgresql.org> | 2019-11-11 16:34:01 +1300 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2019-11-11 17:06:59 +1300 |
commit | db2687d1f3787aa8113b3dbb358153feee30c64c (patch) | |
tree | 077c225c3a719ca4193038165ca152af97f6ac0c /src/backend/utils/adt/json.c | |
parent | 695c5977c8bc115029a85dcc1821d7b0136b4e4c (diff) | |
download | postgresql-db2687d1f3787aa8113b3dbb358153feee30c64c.tar.gz postgresql-db2687d1f3787aa8113b3dbb358153feee30c64c.zip |
Optimize PredicateLockTuple().
PredicateLockTuple() has a fast exit if tuple was written by the current
transaction, as in that case it already has a lock. This check can be
performed using TransactionIdIsCurrentTransactionId() instead of
SubTransGetTopmostTransaction(), to avoid any chance of having to hit the
disk.
Author: Ashwin Agrawal, based on a suggestion from Andres Freund
Reviewed-by: Thomas Munro
Discussion: https://postgr.es/m/CALfoeiv0k3hkEb3Oqk%3DziWqtyk2Jys1UOK5hwRBNeANT_yX%2Bng%40mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/json.c')
0 files changed, 0 insertions, 0 deletions