Databases

Add a PostgreSQL database to your app on ProductEcho

Create a managed PostgreSQL 17 or 18 database from your coding agent, connect your app through DATABASE_URL over TLS, then resize or pause it.

Updated

What you get

Ask your coding agent for a database and ProductEcho creates a managed PostgreSQL database in your workspace, saves its connection string on your app as DATABASE_URL, and your app connects over TLS.

  • PostgreSQL 17 or 18. 17 is the default.
  • Its own address. <id>.rds.productecho.com, port 5432, where <id> is a 6-character name such as xgos8u.
  • One database and one login. Both are named postgres unless you or your agent choose other names.
  • Sizes from db.micro (0.1 vCPU, 256 Mi) to db.8dcu (2 vCPU, 8 Gi). Storage starts at 1 GB and can grow. The sizes you can pick depend on your plan.
  • Encrypted at rest. Data is stored on encrypted disks (AWS EBS encryption, with keys managed by AWS).

How it works

Diagram of a PostgreSQL database on ProductEcho. Your coding agent calls launch_postgres, and ProductEcho creates the database at <id>.rds.productecho.com. The agent reads the connection string with get_postgres_credentials and saves it on your app as DATABASE_URL. The app connects over TLS, through ProductEcho's database gateway on port 5432.
01

Your agent creates the database

It calls launch_postgres with a version, a size and the storage you need (1 GB at least). The database is ready when its status is Running.
02

It reads the connection string

get_postgres_credentials returns the host, the login, the password and a ready-made URL: postgresql://postgres:<password>@<id>.rds.productecho.com/postgres?sslmode=require&sslnegotiation=direct.
03

It saves the string on your app

As the environment variable DATABASE_URL: at the first deploy, or on an app that is already live, which then restarts to pick it up.
04

Your app connects over TLS

Your code reads DATABASE_URL and connects. TLS 1.2 or newer is required, and the URL already asks for it.

Create one from your coding agent

To deploy an app and its database together, ask for both in one prompt:

Any MCP client
Deploy this app to ProductEcho with PostgreSQL.

To add a database to an app that is already live, name the app:

Any MCP client
Create a PostgreSQL database on ProductEcho for my app feedback-board and set it as DATABASE_URL.

With the ProductEcho plugin in Claude Code, you can also call the PostgreSQL skill directly:

Claude Code
/productecho-plugin:productecho-postgres create a database with 1GB storage

Connect from your code

Read the whole URL from DATABASE_URL and pass it to your driver as it is. The two settings at the end matter:

  • sslmode=require encrypts the connection.
  • sslnegotiation=direct starts TLS straight away, which ProductEcho's gateway needs. It is a PostgreSQL 17 client option, so use psql 17 or newer, or a driver that supports direct TLS.

To connect from your own computer, ask your agent for the connection string, or copy it from the database's Connect tab in the console:

bash
psql "postgresql://postgres:<password>@<id>.rds.productecho.com/postgres?sslmode=require&sslnegotiation=direct"

The psql banner should say SSL connection. More on drivers, pools and timeouts: PostgreSQL connections in production.

Manage it in the console

Databases appear under PostgreSQL in the ProductEcho console, with their status, address, size and storage.

app.productecho.com/dashboard/postgresFull size
ProductEcho console, PostgreSQL page. One database, xgos8u, is Running on PostgreSQL 17 with 0.1 vCPU, 256 Mi of memory and 1 GB of storage. A counter reads 1 of 5 databases.
The PostgreSQL page lists each database with its status, endpoint, capacity and storage.

Open a database to see its host, database name and login. The password, the connection string and code examples are on the Connect tab.

app.productecho.com/dashboard/postgres/xgos8u?section=overviewFull size
ProductEcho console, database overview. The database xgos8u is Running. A Connection card marked TLS required shows the host, the database name feedback_board and the user feedback. A Resources card lists PostgreSQL 17, 0.1 vCPU, 256 Mi of memory and 1 GB of storage.
The Overview tab shows the connection endpoint and the compute and storage reserved for the database.

Resize

In Settings, choose a compute size and, separately, a larger storage size. Raising storage does not take your app offline. Changing CPU and memory restarts the database. Your agent can raise storage too, with resize_postgres.

app.productecho.com/dashboard/postgres/xgos8u?section=settingsFull size
ProductEcho console, database settings. The compute dropdown is open and lists db.micro, db.1dcu, db.2dcu, db.4dcu and db.8dcu with their vCPU and memory. A separate Storage field shows 1 GB.
Compute sizes run from db.micro (0.1 vCPU, 256 Mi) to db.8dcu (2 vCPU, 8 Gi). Storage is set separately.

Pause and resume

Pausing stops the database and keeps its disk. Apps cannot connect until you resume it. Your agent can do both with pause_postgres and resume_postgres.

Delete

Deleting a database also deletes its disk. It cannot be undone.

Check it worked

  • The database shows Running in the console, or your agent's get_postgres_status says so.
  • Your app's Environment tab lists DATABASE_URL.
  • A page that reads from the database loads on the live URL.

Good to know

  • Connect from anywhere over TLS.
  • Storage grows without downtime. Raise it any time.
  • One login, and it is the owner. No second, limited login is created. You can create one yourself with SQL.

How to keep production data safe: connect an AI-generated app to production data.

Fix common problems

The connection is closed before login, or TLS fails

Your client or driver does not support sslnegotiation=direct. Use psql 17 or newer, or a driver version that supports direct TLS.

The app cannot find DATABASE_URL

Check the app's Environment tab. An update replaces the whole list of variables, so an agent call that sent other variables can drop it. Ask your agent to set DATABASE_URL again.

It worked, then stopped connecting

The database may be paused, or its password changed with SQL. Resume it, or update DATABASE_URL with the new password.

Questions

Which PostgreSQL versions can I use?+

PostgreSQL 17, the default, or 18.

Can I connect from my own computer?+

Yes, with `psql` 17 or newer and the connection string from the console or your agent.

How does my app get the database password?+

Your agent saves the full connection string, password included, on the app as `DATABASE_URL`. Your code reads it from the environment.