PgBouncerWinBinaries
PgBouncerWinBinaries is a project to host pre-built Windows binaries of the pgBouncer project.
Still work in progress, I don’t know where to get pgbevent.dll
at the moment. There is also an issue with pandoc in the development state: Check this response on Github for a workaround.
Downloads built by me:
- 1.12.0: Download
Downloads from Saito:
- 1.12.0: Download
- 1.9.0: Download
- 1.8.1: Download
- 1.7.2: Download
- 1.7.1: Download
- 1.6.1: Download
- 1.5.5: Download
- 1.5.4: Download
- 1.5.3: Download
- 1.5.2: Download
- 1.5.0: Download
- 1.4.2: Download
- 1.4.0: Download
- 1.3.4: Download
- 1.3.3: Download
How to build your own binary
- Create a folder like
C:\PGBouncerForBuilding
. Don’t use special chars or empty spaces or stuff like that. - Download and install MSYS2.
- Update the package database and core system packages with:
pacman -Syu
- If needed, close MSYS2, run it again from Start menu. Update the rest with:
pacman -Su
-
Install the needed packages:
pacman -S msys/libtool pacman -S msys/libevent pacman -S msys/autoconf pacman -S msys/automake-wrapper pacman -S msys/pkg-config pacman -S base-devel gcc cmake pacman -S msys/libevent-devel # Not sure if these are really needed: pacman -S mingw-w64-x86_64-libevent pacman -S mingw-w64-x86_64-pkg-config pacman -S mingw-w64-x86_64-gcc
- If you get the error:
configure: error: no acceptable C compiler found in $PATH
, you need to do:- Install build toools using
pacman -S --needed base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain git subversion mercurial mingw-w64-i686-cmake mingw-w64-x86_64-cmake
- Add
C:\msys64\mingw64\bin
andC:\msys64\mingw32\bin
, in that order, to your PATH variable. - Note that MSYS2 also puts a lot of other tools in this directory, most notably Python. So put these entries below any other tools you might have installed in your PATH.
- Install build toools using
- Install pandoc from https://pandoc.org/installing.html.
- Add
C:\Program Files\Pandoc
to thePATH
environment variable. - Go to your root folder, e.g.
C:\PGBouncerForBuilding
. -
Clone the git repository to your folder using:
git clone https://github.com/pgbouncer/pgbouncer.git cd pgbouncer git submodule init git submodule update
-
Compile for Windows using:
./autogen.sh ./configure ... make make install
- Hint: I have no idea if the installation step for Pandoc is needed or not. If you get errors with Pandoc, don’t pull pgbouncer from Git, but download a release from https://github.com/pgbouncer/pgbouncer/releases.
- Unzip the release to a folder, e.g.
C:\PGBouncerForBuilding
and go to this directory. -
Run the following commands:
cd pgbouncer-1.12.0 # Adjust this if your release is different. ./autogen.sh ./configure ... make make install
- Your generated files are located under
C:\msys64\usr\share\doc\pgbouncer
andC:\msys64\usr\bin
(If you installed everything in the default directories). - The files you need are:
- pgbevent.dll (I have no idea where to get this one)?
- pgbouncer.exe
- pgbouncer.ini or config.ini or similar
- users.txt or userslist.txt or similar
Further links
- https://www.pgbouncer.org/
- https://github.com/pgbouncer/pgbouncer
- https://www.pgbouncer.org/install.html#building-on-windows
http://winpg.jp/~saito/pgbouncer/- https://stackoverflow.com/questions/37925410/how-to-install-pgbouncer-on-windows-7-x64
- https://www.msys2.org/
- https://github.com/pgbouncer/pgbouncer/issues/442
- https://osdn.net/projects/mingw/ticket/39946
- https://stackoverflow.com/questions/26453293/what-is-the-best-way-to-install-pkg-config-on-mingw-in-2014
- https://stackoverflow.com/questions/37725825/aclocal-not-found-for-mingw-sh-autogen-sh-execution
- https://github.com/orlp/dev-on-windows/wiki/Installing-GCC–&-MSYS2
- https://feaforall.com/install-c-language-gcc-compiler-windows/
- https://stackoverflow.com/questions/33398574/cant-compile-pgbouncer-neither-in-linux-nor-in-windows
- https://github.com/pgbouncer/pgbouncer/issues/463
- https://github.com/pgbouncer/pgbouncer/issues/473
- https://github.com/pgbouncer/pgbouncer/issues/474
Further links (Not so relevant)
- https://www.aerospike.com/docs/client/libevent/build/windows.html
- https://github.com/libevent/libevent/releases/
- https://www.quora.com/What-are-some-ways-of-installing-libevent
- https://stackoverflow.com/questions/1710922/how-to-install-pkg-config-in-windows
Change history
See the Changelog.