PgBouncerWinBinaries

PgBouncerWinBinaries is a project to host pre-built Windows binaries of the pgBouncer project.

View project on GitHub

PgBouncerWinBinaries

PgBouncerWinBinaries is a project to host pre-built Windows binaries of the pgBouncer project.

Build status GitHub issues GitHub forks GitHub stars License: MIT Gitter

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:

Downloads from Saito:

How to build your own binary

  1. Create a folder like C:\PGBouncerForBuilding. Don’t use special chars or empty spaces or stuff like that.
  2. Download and install MSYS2.
  3. Update the package database and core system packages with: pacman -Syu
  4. If needed, close MSYS2, run it again from Start menu. Update the rest with: pacman -Su
  5. 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
    
  6. 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 and C:\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.
  7. Install pandoc from https://pandoc.org/installing.html.
  8. Add C:\Program Files\Pandoc to the PATH environment variable.
  9. Go to your root folder, e.g. C:\PGBouncerForBuilding.
  10. Clone the git repository to your folder using:

    git clone https://github.com/pgbouncer/pgbouncer.git
    cd pgbouncer
    git submodule init
    git submodule update
    
  11. Compile for Windows using:

    ./autogen.sh
    ./configure ...
    make
    make install
    
  12. 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.
  13. Unzip the release to a folder, e.g. C:\PGBouncerForBuilding and go to this directory.
  14. Run the following commands:

    cd pgbouncer-1.12.0 # Adjust this if your release is different.
    ./autogen.sh
    ./configure ...
    make
    make install
    
  15. Your generated files are located under C:\msys64\usr\share\doc\pgbouncer and C:\msys64\usr\bin (If you installed everything in the default directories).
  16. 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

Change history

See the Changelog.