PostgreSQL
Last updated
PostgreSQL databases are managed under the same Databases and Database Users pages as MariaDB; pick PostgreSQL as the engine when creating.
Differences from MariaDB
- Connection: Unix socket path is
/var/run/postgresql(not/run/mysqld/). - Web UI: pgAdmin instead of phpMyAdmin. Per-row SSO works identically.
- Naming: same
<username>_<suffix>prefix policy. - Defaults:
client_encoding = utf8,timezone = UTC. Override per-database viaALTER DATABASE … SET …from pgAdmin orpsql. - Roles: PostgreSQL’s role model conflates user and group. The DB-user concept in the panel maps to a PostgreSQL role with
LOGINprivilege.
Connection string
postgres:///<your-username>_<suffix>?host=/var/run/postgresql&user=<db-user>&password=<password>
For libraries that take separate fields:
host=/var/run/postgresql
port=5432
user=<db-user>
password=<password>
dbname=<your-username>_<suffix>
Extensions
PostgreSQL extensions (postgis, pgvector, uuid-ossp, pg_trgm, etc.) are enabled at the engine level by the operator. Once enabled, you may install them in your database from pgAdmin or psql:
CREATE EXTENSION pgvector;
If an extension you need is not enabled, contact your administrator.
Backups
PostgreSQL databases are included in account_full backups via per-database pg_dump. The restore flow uses psql to replay the dump.
Tuning
Per-database tuning (work_mem, shared_buffers per-tenant) is not exposed at the tenant level. Server-wide tuning is operator-controlled under Database Tuning.
Why both engines
PostgreSQL is preferred for new applications that benefit from its richer SQL features (window functions, JSON-with-indexes, CTEs, advisory locks). MariaDB remains the default for the vast majority of PHP applications (WordPress, Moodle, etc.) that assume MySQL semantics. The panel runs both so tenants can choose.