aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/ruleutils.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2023-10-10 11:30:20 -0400
committerRobert Haas <rhaas@postgresql.org>2023-10-12 13:48:21 -0400
commitdf9a3d4e99941f66f7a247eb01a48c1c2630625d (patch)
treefb5171dfc84cd53e857a2b3ef0b77ceb4218057d /src/backend/utils/adt/ruleutils.c
parentd9e46dfb78abf4d3be6071b8c4495df9e1bb4706 (diff)
downloadpostgresql-df9a3d4e99941f66f7a247eb01a48c1c2630625d.tar.gz
postgresql-df9a3d4e99941f66f7a247eb01a48c1c2630625d.zip
Unify two isLogSwitch tests in XLogInsertRecord.
An upcoming patch wants to introduce an additional special case in this function. To keep that as cheap as possible, minimize the amount of branching that we do based on whether this is an XLOG_SWITCH record. Additionally, and also in the interest of keeping the overhead of special-case code paths as low as possible, apply likely() to the non-XLOG_SWITCH case, since only a very tiny fraction of WAL records will be XLOG_SWITCH records. Patch by me, reviewed by Dilip Kumar, Amit Kapila, Andres Freund, and Michael Paquier. Discussion: http://postgr.es/m/CA+TgmoYy-Vc6G9QKcAKNksCa29cv__czr+N9X_QCxEfQVpp_8w@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
0 files changed, 0 insertions, 0 deletions