openstead
Databases & storage

PostgreSQL

Create a managed PostgreSQL database, connect privately, and protect application data with backups.

Suggest a change

Openstead PostgreSQL provides a private relational database with persistent storage and logical backups. Create the database in the same environment as the applications that use it.

Create a PostgreSQL database

  1. Select your project and environment in the dashboard.
  2. Choose New → PostgreSQL.
  3. Enter the service name and choose the PostgreSQL version. Openstead supports major versions 16, 17, and 18; check application and extension compatibility before choosing.
  4. Set the database name and username, or use the suggested values.
  5. Choose a PostgreSQL plan and review its included storage.
  6. Complete checkout for the service month and wait for provisioning to finish.

PostgreSQL uses database-specific plans. See Pricing for the current plans. It does not have a Free database tier.

Connect your application

Open Connections to find the private address. Authorised members can reveal the database name, username, password, port, and connection URL. PostgreSQL listens on port 5432.

Prefer a connection reference over copying a password. On the application, connect the database's Connection URL field to DATABASE_URL, then redeploy the application. Openstead resolves the value into the release environment.

For an application using Node's pg library:

import { Pool } from 'pg';

const pool = new Pool({
  connectionString: process.env.DATABASE_URL,
  max: 5,
});

const result = await pool.query('SELECT current_database(), version()');

Install the client library in your application's dependencies. Choose pool sizes for the database and the number of application replicas; every worker or replica can create its own pool.

The hostname is reachable from applications in the same Openstead environment. Public desktop-client connections are not available. Do not add a public DNS record or open database ports as a workaround. See Database connections.

Run migrations

Run schema migrations from your application, using its configured database reference. On a paid application instance, a pre-deploy command or an explicit shell or one-off command can run the framework's migration command.

Run a migration once per release, not independently in every web worker. Back up first and design changes to remain compatible with the previous application release when possible.

Persistent storage

Openstead places the PostgreSQL cluster on its managed persistent volume. A normal container replacement preserves the database. Changing an application's image or redeploying it does not migrate or reset this database.

Treat the database name, user, and major PostgreSQL version as initialisation choices. Major-version changes require a separate database and a deliberate migration. Do not attempt a major upgrade by replacing the image tag on an existing cluster.

Paid plan upgrades can grow the included disk allocation. Downgrading does not shrink stored data; review the quoted retained storage when selecting a smaller plan.

Backups and recovery

Daily backups are enabled by default. Configure retention in Recovery, from 1 to 30 days. A manual export creates a PostgreSQL custom-format .dump archive. Wait for a completed export before relying on it as a recovery point.

Restoring a backup creates a separate database with its own capacity and credentials. Test the restored data, then change application references and redeploy. The source database is not overwritten. See Backups and recovery.

Logical backups are discrete recovery points. They do not provide continuous point-in-time recovery, automatic failover, or backups of application uploads.

Troubleshooting

SymptomCheck
Hostname cannot be resolvedThe connecting process is hosted in the database's environment, not on a laptop or another environment
Password authentication failedThe application uses the current connection reference and has been redeployed
Database or relation missingCorrect database name, migration history, and restore completion
Too many connectionsPool size, replica count, background workers, and connections not being released
Connection refusedDatabase running state, provisioning completion, and paid-through status

If storage verification or restoration reports a problem, retain the source database and its backups and contact support before deleting or recreating resources.

Need a hand? Contact Openstead support.

On this page