aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistbuild.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-04-09 11:16:04 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2012-04-09 11:16:04 -0400
commite969f9a78008d6a09abf8646f1338e2dff447cbf (patch)
tree0573f404fa742301a7a1aa9d15c03611f2c33d1e /src/backend/access/gist/gistbuild.c
parent140a4fbf1a87891a79a2c61a08416828d39f286a (diff)
downloadpostgresql-e969f9a78008d6a09abf8646f1338e2dff447cbf.tar.gz
postgresql-e969f9a78008d6a09abf8646f1338e2dff447cbf.zip
Save a few cycles while creating "sticky" entries in pg_stat_statements.
There's no need to sit there and increment the stats when we know all the increments would be zero anyway. The actual additions might not be very expensive, but skipping acquisition of the spinlock seems like a good thing. Pushing the logic about initialization of the usage count down into entry_alloc() allows us to do that while making the code actually simpler, not more complex. Expansion on a suggestion by Peter Geoghegan.
Diffstat (limited to 'src/backend/access/gist/gistbuild.c')
0 files changed, 0 insertions, 0 deletions