Developer PostgreSQL builds
If you have built PostgreSQL with the full set of development options turned on, your pgbench
results will be considerably slowed by that. This is something to watch out for particularly in the alpha and beta builds of the software, where these features may even be turned on in packaged versions such as the beta RPMs.
The worst performance hit comes from having assertions, checks in the code for unexpected conditions, enabled. The assertion overhead scales upward as you increase shared_buffers
, which can result in the unexpected situation where large buffer cache sizes actually decrease performance on the benchmark. Whenever you're starting to use pgbench, it's a good idea to check that you don't have an assertions enabled build like this:
postgres=# show debug_assertions; debug_assertions ------------------ off
That will keep you from wasting time running benchmarks that have confusing results.