Skip to content
Rowsafe

Managed PostgreSQL for your Go app

PostgreSQL for your Go service with pgx, created by your coding agent or two commands, backed up from the first minute.

Ask your agent

Claude Code, Cursor or Codex
Create a PostgreSQL database for this Go app on Rowsafe Cloud and connect it with DATABASE_URL in .env.

Your agent picks a size, tells you the price and waits for your yes. Then it creates the server as you and, once it's ready (5 to 10 minutes), puts DATABASE_URL in .env. Through the Claude Code or Codex plugin, you create the login in the dashboard instead and paste it in: the password is made in your browser.

First time? Connect Rowsafe to your agent once.

Or from the terminal

Terminal
rowsafe cloud create shop-db --wait
rowsafe env --on shop-db

rowsafe cloud create shows the price and asks first. rowsafe env makes the password on your computer, writes DATABASE_URL to .env and adds .env to .gitignore. Rowsafe never sees it.

Connect your app

main.go
package main

import (
	"context"
	"log"
	"os"

	"github.com/jackc/pgx/v5/pgxpool"
	_ "github.com/joho/godotenv/autoload" // reads DATABASE_URL from .env
)

func main() {
	ctx := context.Background()
	pool, err := pgxpool.New(ctx, os.Getenv("DATABASE_URL"))
	if err != nil {
		log.Fatal(err)
	}
	defer pool.Close()

	var orders int
	if err := pool.QueryRow(ctx, "SELECT count(*) FROM orders").Scan(&orders); err != nil {
		log.Fatal(err)
	}
	log.Printf("%d orders", orders)
}

go get github.com/jackc/pgx/v5 github.com/joho/godotenv. In .env, change sslmode=require to sslmode=verify-full: pgx then checks the server's certificate against your system's trusted authorities. One pool per process; it's safe to share across goroutines.

Backups and restores

Rowsafe backs up every change, encrypted on the server with a key only you have, so you can restore to any second. Every week it restores a backup to prove it works. Restore a copy, bring back deleted rows or rewind the whole database, in one click. Before a risky change, save a Mark (rowsafe mark), or let your agent save one.

From $0.014 an hour, never more than $10 a month.

Questions

Does it work with database/sql, sqlc or GORM?

Yes. database/sql takes the same URL through github.com/jackc/pgx/v5/stdlib, sqlc generates code for pgx, and GORM's PostgreSQL driver uses pgx.

How does my app's server connect?

At first only your computer can. Add your server's address under Who can connect on the server's page, or run rowsafe cloud allow shop-db ADDRESS.

Can I move my data from Supabase, Neon, RDS or Heroku?

Yes, with Move in: it copies your database while your app keeps running (from Heroku, writes pause during the copy). How it works

Your PostgreSQL database, ready in minutes.

Compare prices