aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/commit_ts.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-11-25 16:05:57 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2015-11-25 16:05:57 -0500
commit46166197c3b3748c3266c694d7c2f5a312ea928e (patch)
tree10c51e4df74e251313c983bbc03e86b36d863fb1 /src/backend/access/transam/commit_ts.c
parent0271e27c1089f104236a7fe3b3fca52e5359ae56 (diff)
downloadpostgresql-46166197c3b3748c3266c694d7c2f5a312ea928e.tar.gz
postgresql-46166197c3b3748c3266c694d7c2f5a312ea928e.zip
Improve div_var_fast(), mostly by making comments better.
The integer overflow situation in div_var_fast() is a great deal more complicated than the pre-existing comments would suggest. Moreover, the comments were also flat out incorrect as to the precise statement of the maxdiv loop invariant. Upon clarifying that, it becomes apparent that the way in which we updated maxdiv after a carry propagation pass was overly slow, complex, and conservative: we can just reset it to one, which is much easier and also reduces the number of times carry propagation occurs. Fix that and improve the relevant comments. Since this is mostly a comment fix, with only a rather marginal performance boost, no need for back-patch. Tom Lane and Dean Rasheed
Diffstat (limited to 'src/backend/access/transam/commit_ts.c')
0 files changed, 0 insertions, 0 deletions