PostgreSQL pgbench [pts/pgbench]

This is a simple benchmark of PostgreSQL using pgbench.

This benchmark test was uploaded by Phoronix Test Suite.

Looking For The Best Performance?

If you want to see how many different systems compare performance-wise for this test profile, visit the performance showdown page.

Revision History

pts/pgbench-1.9.1 [04 Oct 2019 06:53:32 EDT]
- Fix heavy contentiob by going off physical CPU cores.

pts/pgbench-1.9.0 [03 Oct 2019 09:57:40 EDT]
- Update against PostgreSQL 12.0. NOTE: still waiting on official Windows postgresql 12 release binaries.

pts/pgbench-1.8.7 [29 Mar 2019 03:20:12 EDT]
- Update download URLs.

pts/pgbench-1.8.6 [07 Dec 2018 12:47:49 EST]
- Enable BSD build support.

pts/pgbench-1.8.5 [07 Sep 2018 09:43:34 EDT]
- Add bc as an external dependency.

pts/pgbench-1.8.4 [25 Mar 2018 13:10:40 EDT]
- Fix the bundled patch allowing PostgreSQL to run as root.

pts/pgbench-1.8.3 [22 Mar 2018 18:07:18 EDT]
- Adjust run count as was bumped lower during debugging.

pts/pgbench-1.8.2 [22 Mar 2018 18:06:30 EDT]
- Create db directory on Windows otherwise the test seems to sometimes fail, also add note about MSVCR120.dll needing to be on system for PostgreSQL to work.

pts/pgbench-1.8.1 [01 Mar 2018 11:46:17 EST]
- Tidy up the Windows support, appears to be good to go.

pts/pgbench-1.8.0 [01 Mar 2018 11:26:11 EST]
- Update against upstream PostgreSQL 10.3, add initial Windows bits.

pts/pgbench-1.7.0 [14 Oct 2017 15:23:03 EDT]
- Updating against postgresql 10.0

pts/pgbench-1.6.0 [19 May 2017 11:57:32 EDT]
- Update against upstream PostgreSQL 9.6.3.

pts/pgbench-1.5.2 [08 Oct 2015 16:05:08 EDT]
- Update download links, advertise BSD compatibility.

pts/pgbench-1.5.1 [09 Jun 2015 21:16:09 EDT]
- Hack up pgbench to let it run as root

pts/pgbench-1.5.0 [09 Jun 2015 20:05:58 EDT]
- Major update/overhaul of pgbench PostgreSQL benchmark.

pts/pgbench-1.4.0 [11 Apr 2012 10:15:04 EDT]
- Move back to older PostgreSQL 8.4.11 upstream server version to work around PostgreSQL 9.x issue right now dealing with the plpg

pts/pgbench-1.3.0 [27 Aug 2011 16:23:30 EDT]
- Update PostgreSQL to version 9.0.4.

pts/pgbench-1.2.0 [06 Dec 2010 15:16:36 EST]
- Initial import into

Recent Results With This Test


1 System - 169 Benchmark Results

1 System - 72 Benchmark Results

1 System - 108 Benchmark Results

1 System - 169 Benchmark Results

1 System - 108 Benchmark Results

1 System - 8 Benchmark Results

6 Systems - 17 Benchmark Results

1 System - 21 Benchmark Results

1 System - 103 Benchmark Results

3 Systems - 143 Benchmark Results

1 System - 137 Benchmark Results

1 System - 4 Benchmark Results

1 System - 137 Benchmark Results

2 Systems - 25 Benchmark Results

1 System - 40 Benchmark Results

Most Popular Results With This Test


11 Systems - 26 Benchmark Results

1 System - 26 Benchmark Results

1 System - 34 Benchmark Results

6 Systems - 30 Benchmark Results

1 System - 84 Benchmark Results

1 System - 61 Benchmark Results

Find More Test Results

User Comments

Centos 5.6 notes, workarounds

Do not install this benchmark when running as root. The automated postgres database setup will silently error out, as it insists on being a non-root user. You can install Phoronix as root, but switch to another user to run the "/usr/bin/phoronix-test-suite install pts/pgbench" command. You can't use the benchmark after it's "installed" as root, because the "installation" is local to the user, in ~/.phoronix-test-suite/ directory, and setup will have failed if you do it as root.

Secondly, the benchmark will fail unless you create the following file:


..and put in it the following line(s) (where /home/YOURUSER is the home directory of the user that you are about to run the install as:



-Craig @ Halcyon Canada

Post by craighalcyon on 02 December 2011, 11.35.

Quick test for different filesystems.

If you'd like to isolate your I/O devices for this test, a quick way to do so is to create a new user with home directory on the FS you'd like to bench. Then su to that user and install/run the test. Postgres will be installed in ~/.phoronix-test-suite. You may even `usermod -d /tmp test` if you want to run from tmpfs and skip disk I/O altogether. Just beware that if your /tmp is tmpfs (RAM) you will lose all contents after a reboot.

This is a great test. Thanks to the developers. I use it often.

Post by boeroboy on 21 January 2014, 14.26.

Setup on Ubuntu 14

Ubuntu 14.04 comes with GCC 4.8 and the installation of this bench will silently fail. You'll get an error message that the benchmark could not be completed.
Install GCC 4.6 (sudo apt-get install gcc-4.6 g++-4.6) and set it as active (sudo update-alternatives --config gcc). After that, re-install pts/pgbench and you're good to go.

Post by ervin on 17 October 2014, 05.36.

Post A Comment