Concepts — PostgreSQL
Architecture
PostgreSQL on Hikube is a managed service. Each cluster created from the console is a set of replicated PostgreSQL instances, with automatic failover and streaming replication. It belongs to a project and consumes that project's quotas (CPU, memory, storage).
Terminology
| Term | Description |
|---|---|
| PostgreSQL Cluster | Managed instance created from the console, made up of a primary and optional replicas. |
| Project | Isolated space that groups your resources and carries the quotas. |
| Primary | Main instance that accepts reads and writes. |
| Replica | Read-only instance, synchronized from the primary through streaming replication. |
| Instance preset | Resource template (CPU, memory) allocated to each node of the cluster. |
| External access | Option that exposes the cluster on the Internet through a public IP address. |
| Extension | PostgreSQL module (for example pgcrypto, vector) enabled per database. |
| WAL | Write-Ahead Log — the PostgreSQL transaction log, the basis of replication. |
Replication and high availability
High availability relies on:
- Streaming replication: replicas continuously receive WAL from the primary
- Automatic failover: if the primary goes down, a replica is promoted automatically
The number of replicas is chosen at creation, in the Number of replicas field:
| Offered value | Use |
|---|---|
| 1 (Standalone) | Development, testing |
| 2 (High Availability) | Production with one standby |
| 3 (Max High Availability) | Critical production |
The number of replicas cannot be changed after creation ("The mode cannot be changed after creation"). Choose it according to your availability needs. To change it, contact support.
Synchronous replication (quorum) is not offered in the console; contact support.
Databases, users and rights
Each cluster has:
- a
postgressystem database, created automatically and reserved for the platform (see below); - the databases you add, at creation or later (Databases tab), with their extensions;
- the users you create (Users tab). Each user is granted, database by database, one of the following two rights:
- Administrator (Admin): read and write;
- Read-only: read only.
A user's password is generated by the platform and displayed only once, at creation or after a rotation. It cannot be viewed afterwards: if it is lost, generate a new one with Change Password.
System databases
postgres, template0 and template1 are system databases, reserved for the platform:
- the user wizards do not offer them, and no right can be granted on them;
- creating one is refused: ““postgres” is a system database: choose an application database.”;
- in the database list, Manage extensions and Delete database are disabled on a system database: “System database: it can be neither changed nor deleted.”
A user who already holds a right on a system database keeps it as is. In Manage Access, this right is shown locked, with a warning: you can remove the row, but not change it. Grant your users their rights on application databases.
Naming rules
| Item | Rule |
|---|---|
| Cluster name | 3 to 16 characters: lowercase letters, digits and hyphens; starts with a letter, ends with a letter or a digit |
| Username | 3 to 16 characters: lowercase letters, digits and underscores (_); starts with a lowercase letter or an underscore. No hyphen (-). |
| Database name | 1 to 54 characters: lowercase letters, digits, underscores (_) and hyphens (-); starts with a letter or an underscore, but not with pg_ |
The usernames postgres, admin, root, owner, superuser, streaming_replica, as well as those starting with pg_, are reserved.
Instance presets
The Instance preset defines the capacity allocated to each node of the cluster. Presets are the virtual machine sizes of the u1, s1 and m1 series: a preset has the same resources as the VM of the same name. The list displayed by the wizard is authoritative:
| Preset | CPU | Memory |
|---|---|---|
u1.medium | 1 | 4Gi |
u1.large | 2 | 8Gi |
u1.xlarge | 4 | 16Gi |
u1.2xlarge | 8 | 32Gi |
u1.4xlarge | 16 | 64Gi |
u1.8xlarge | 32 | 128Gi |
s1.small | 1 | 2Gi |
s1.medium | 2 | 4Gi |
s1.large | 4 | 8Gi |
s1.xlarge | 8 | 16Gi |
s1.2xlarge | 16 | 32Gi |
s1.4xlarge | 32 | 64Gi |
m1.large | 2 | 16Gi |
m1.xlarge | 4 | 32Gi |
m1.2xlarge | 8 | 64Gi |
m1.4xlarge | 16 | 128Gi |
m1.8xlarge | 32 | 256Gi |
The wizard does not preselect any preset: choose one to continue. Each option shows its resources, for example “u1.medium — 1 CPU / 4Gi”. If the list cannot be loaded, the wizard displays “The preset list could not be loaded. Try again later or contact support.”
A cluster created with a former preset (nano, micro, small, medium, large, xlarge or 2xlarge) keeps it and runs as before: the Edit form shows it as is and saves it unchanged. If a cluster's resources were set outside its preset, the form says so with the mention “(override)”.
Defining custom CPU/memory resources (outside presets) is not offered in the console; contact support.
Network access
- Internal host: always assigned, shown in the Internal zone of the Connection and Databases card. It points to the primary and is reachable from the VMs and Kubernetes clusters of the same project, not from another project or from the Internet.
- External access disabled (default): the cluster is not exposed on the Internet. The External zone shows Disabled.
- External access enabled: the platform assigns a public IP address, shown in the External zone. The port is the standard PostgreSQL port,
5432.
External access can be enabled or disabled after creation, from Edit. Its cost (public IP address) is included in the wizard's Estimated Cost.
Backup and restore
PostgreSQL clusters are backed up to an S3 bucket in the project and restored from the Backups tab of their page, with the backup service. Transaction logs are archived continuously between two backups, which makes it possible to restore the database to a point in time. See Configure backups and Restore a backup.
Quotas and cost
From the Configuration step onwards, the creation wizard displays the Estimated Cost (monthly and hourly) and the cluster's impact on the project quotas (CPU, memory, storage). Consumption takes into account the preset, the number of replicas and the disk size. If the cluster exceeds the available quotas, the Next button stays disabled.
| Parameter | Value |
|---|---|
| Disk size | 1 to 4,096 GB, within the project's storage quota; increase only after creation |
| Replicas | 1, 2 or 3 |
Going further
- Overview: service presentation
- Quick start: create your first cluster