Skip to content
VDS Panel
VDS Panel
Server Management
database 22 Mart 2026 · 8 dk okuma

PostgreSQL Automatic Installation: Connection Pool and Backup Guide

Creating a PostgreSQL database with VDS Panel, PgBouncer connection pool installation, automatic backup and restoration processes. Say goodbye to manual psql commands.

#postgresql #pgbouncer #veritabanı #backup #restore
VDS Panel
VDS Panel Ekibi
Ürünü geliştiren ekip

PostgreSQL is the crown jewel of the open source database world. Reliable, scalable, standards-adherent. However, in production, efficient installation, connection pool setting, backup and restoration processes require information. Much more than a single P0 command.

In this article, we will explain how VDS Panel automatically manages PostgreSQL, how it scales with PgBouncer, and its backup strategy.

Bir bakışta
~4 sec
DB + user + permission setup
500+
Parallel connection with PgBouncer
15 min
Automatic reserve interval
AES-256
Backup encryption

New project = new database

PostgreSQL configuration in traditional flow:

P0

Then into your app’s env:

P1

In VDS Panel: Check the “Add PostgreSQL” box when adding the project. The rest is automatic:

  1. 01
    User is created
    User named myapp_user with 32 character strong password. The password is not exposed again outside the DB.
  2. 02
    Database is created
    A DB named myapp_production is assigned to a new user as owner.
  3. 03
    Public schema permissions are granted
    For PG 15+, DEFAULT PRIVILEGES is also set. Liquibase/Flyway migrations work without any problems.
  4. 04
    DATABASE_URL is injected into env
    When the application container starts, it sees the connection string in the process environment. It's not written anywhere in the file or git.
  5. 05
    PgBouncer connection pool is saved
    If it is a high-throughput project, the connection is routed via PgBouncer. Details below.

Why is PgBouncer needed?

PostgreSQL forks a separate process for each connection. If a Node.js API receives 100 concurrent requests, there will be 100 PG processes. This creates memory and context switch overhead.

PgBouncer pools links. Maps 1000 application links to 20-50 real PG links. Conclusion:

5-10×
more throughput
PgBouncer has the same PG capacity as transaction pooling mode.

VDS Panel automatically installs PgBouncer for high traffic projects. Link URL:

P2

The application is not even aware of it; It uses the same interface, but connection pool is running in the background.

Transaction pooling limits

PgBouncer’s P0 pool mode does not support prepared statement and session variables. If your application uses P1 or P2, use P3 mode (slightly lower throughput but full compatibility).

Automatic backup

VDS Panel checks your database every 15 minutes and takes a full backup daily:

  • Database dump with pg_dump —format=custom
  • Encryption with age or gpg (with public key)
  • Optional S3 or R2 upload (disaster recovery)
  • 30 days retention, old backups are automatically cleared
  • Local file is preserved on unsuccessful upload

You can view the backup list and restore any backup from the panel.

Backup encryption key

You upload the age public key to the panel. The private key remains only with you. Even the panel or an attacker cannot decrypt backups. Make sure back up the key offline; If you lose it, you lose access to your backups.

Restore: rollback

A migration went wrong, data was corrupted. From the panel:

  1. “Database” → “Backups” tab
  2. Select your desired backup date
  3. “Restore” button Panel 4:
    • Closes existing connections (maintenance mode)
    • Stores current data as P0
    • Creates a new database from backup
    • Redirects application to new DB
    • Opens links

Total time ~30 seconds (for small DBs). A few minutes for large DBs.

Migration management

Liquibase, Flyway, Prisma, Drizzle, TypeORM, whichever migration tool you use, the panel automatically solves Liquibase/Flyway table ownership problems:

  • Liquibase/Flyway creates table with postgres superuser
  • Application user cannot access these tables (ownership issue)
  • The panel detects this and automatically transfers ownership

Otherwise you will get “permission denied for table…” error; The panel solves this common problem.

PostgreSQL on Kubernetes (CNPG)

If the K3s module is active, CNPG (CloudNativePG operator) can be used for production-grade PostgreSQL. Pros:

  • Automatic failover (standby takes over if primary crashes)
  • Streaming replication (read replicas)
  • Hot backup (backup without downtime)
  • Monitoring integration
  • Scheduled maintenance

It installs CNPG with one click with the VDS Panel K3s module. It is ideal for production scenarios that require high-availability.

##Monitoring

Panel for each PostgreSQL instance:

  • Number of live connections (used/max)
  • Query performance (slow query detection)
  • Disk usage
  • Table sizes
  • Replication lag (if any)
  • Backup status

P0 default; Queries longer than 500ms are logged. You will immediately notice slow queries.

Insulation

On the panel side, each project runs in its own database:

  • Project A cannot access the DB of project B
  • Separate user, separate password, separate schema
  • Backups can be encrypted in separate files with different keys
  • Deletion only affects the DB of that project

For multi-tenant hosting scenarios, this isolation is critical.

Conclusion

PostgreSQL production is a job that takes hours if done manually: user/DB creation, permission assignment, connection pool setup, backup scheduling, restoration testing, monitoring. VDS Panel handles these steps automatically and allows you to manage them from the panel interface.

All you have to do is check the “Add PostgreSQL” box when adding your first project. The rest is completed within 4 seconds. You can check the home page for database module details or share your installation scenario from contact form.

Want to try it on your own server?

Reach out via the contact form and let's prepare a license and install plan tailored to your scenario.

Here when you're ready

Modern deploy experience on your own server, one contact message away.

Tell us about your usage scenario and we'll prepare the right license and install plan. Average response time is under 24 hours.