Skip to main content
Skip to main content

Frequently Asked Questions

In High Availability (HA) mode, PostgreSQL runs on multiple containers with a primary node and replicas. To get the most out of this setup:

  • Use port 5432 for all write operations (INSERT, UPDATE, DELETE) — this always routes to the primary node
  • Use port 5433 for read operations (SELECT) — this distributes queries across all replicas, improving performance

The read replica port (5433) is only available in HA mode. If you're running PostgreSQL in single container (NON_HA) mode, only port 5432 is available.

See Connection Parameters for all available ports and environment variables.

One possible cause:
The connection string in Zerops always starts with postgresql://. While the official PostgreSQL documentation states that both postgresql:// and postgres:// URIs are valid, some software requires the shorter postgres:// version.

To resolve this, create your own environment variable with the correct URI. For example, if your PostgreSQL service is named db, use the following format:

postgres://${db_user}:${db_password}@${db_hostname}:${db_port}