diff options
author | Thomas Munro <tmunro@postgresql.org> | 2019-11-11 16:33:04 +1300 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2019-11-11 16:33:04 +1300 |
commit | 695c5977c8bc115029a85dcc1821d7b0136b4e4c (patch) | |
tree | 61b9edb5b40e3eb4afeec44a34d7a630894ca091 /src/backend/utils/adt/json.c | |
parent | 9fab25c6cd1f943284b8e0014007cd5750d54308 (diff) | |
download | postgresql-695c5977c8bc115029a85dcc1821d7b0136b4e4c.tar.gz postgresql-695c5977c8bc115029a85dcc1821d7b0136b4e4c.zip |
Optimize TransactionIdIsCurrentTransactionId().
If the passed in xid is the current top transaction, we can do a fast
check and exit early. This should work well for the current heap but
also works very well for proposed AMs that don't use a separate xid
for subtransactions.
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