From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Combine two flag tests in GetSnapshotData(). |
Date: | 2018-11-10 04:48:12 |
Message-ID: | E1gLLBs-00041N-ES@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Combine two flag tests in GetSnapshotData().
Previously the code checked PROC_IN_LOGICAL_DECODING and
PROC_IN_VACUUM separately. As the relevant variable is marked as
volatile, the compiler cannot combine the two tests. As
GetSnapshotData() is pretty hot in a number of workloads, it's
worthwhile to fix that.
It'd also be a good idea to get rid of the volatiles altogether. But
for one that's a larger patch, and for another, the code after this
change still seems at least as easy to read as before.
Author: Andres Freund
Discussion: https://postgr.es/m/20181005172955.wyjb4fzcdzqtaxjq@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5fde047f2b41e71706d4ea9e8eb0a401f64192c1
Modified Files
--------------
src/backend/storage/ipc/procarray.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2018-11-10 11:30:51 | Re: pgsql: Split ExecStoreTuple into ExecStoreHeapTuple and ExecStoreBuffer |
Previous Message | David Steele | 2018-11-10 03:50:44 | Re: pgsql: Make WAL segment size configurable at initdb time. |