# Postgres consultant: the database under systems that have to be right.

> SBD designs and builds on PostgreSQL, often through Supabase: schemas for operational data, row level security, connection pooling that survives serverless traffic, and migrations from Airtable, Notion or Sheets when they run out of room, for teams of 1 to 1,000 people. Workflow automation builds start at $1,000 and internal tools at $3,000, with the fixed price set after a $500 Automation Audit that is credited to the build.

- Canonical: https://smallbaydigital.com/integrations/tools/postgres/
- Publisher: SmallBay Digital

## What a Postgres build from SBD does

Postgres is where we put data that must be correct: orders, stock, money, permissions and anything several systems depend on. Most clients do not ask for Postgres by name. They ask why the Airtable base is slow, why two systems disagree, or why a report cannot be trusted, and the answer is a real database underneath.

We build four kinds of thing. Schemas: tables, keys, constraints and indexes designed from how the business works, so bad data is refused at the door. Access: row level security and roles so each user and integration sees only what it should. Integration: Postgres as the main database behind Retool, a custom app, n8n workflows and reporting views. Migration: moving high-volume tables out of Airtable, Notion or Google Sheets while keeping the screens people know.

Several SBD builds run on Postgres through Supabase. Our [consulting internal tool](https://smallbaydigital.com/case-studies/consulting-internal-tool/) replaced a SmartSuite workspace with Next.js and Supabase, with roles enforced on the server. In the portfolio, a [building materials order system](https://smallbaydigital.com/portfolio/building-materials-order-system/) uses Postgres with row level security, and a [marketplace price tracker](https://smallbaydigital.com/portfolio/marketplace-price-tracker/) replaces a Google Sheet product master with a Postgres database.

## When Postgres is the right home, and when it is not

Postgres earns its place when data has relationships that matter, when several systems write to it, when volume outgrows a no-code base, or when access rules must be enforced by the database rather than by a front end. It is free and open source, runs on every major cloud, and is not tied to any one vendor.

We will advise against it when:

- The team needs to change structure weekly without a developer; Airtable or SmartSuite suits that better, as our [Airtable and Supabase comparison](https://smallbaydigital.com/compare/airtable-vs-supabase/) explains.
- Nobody on your side, and no care plan, will own the schema, migrations and backups.
- The data is small, read by people and written by one system; a sheet or a base costs less.

## Connection pooling with serverless functions

The most common Postgres failure we see in modern stacks is running out of connections. The PostgreSQL 18 documentation says max_connections is typically 100 by default, with three reserved for superusers. Serverless functions and edge runtimes open a connection per invocation, so a burst of traffic can exhaust the database even when the queries are tiny.

The fix is a pooler. On Supabase, the documentation in October 2026 describes three ways in: a direct connection on port 5432 for long-running servers, the shared pooler in session mode on port 5432, and the shared pooler in transaction mode on port 6543, which Supabase recommends for serverless and edge functions. Transaction mode has a catch: the shared pooler does not support prepared statements, so clients must turn them off, for example prepare: false in Postgres.js or Drizzle, or pgbouncer=true in a Prisma connection string. Supabase also notes that direct connections use IPv6 unless the project has the IPv4 add-on, which trips up some hosting platforms.

We set the pooling mode per caller: transaction mode for functions, session or direct for workers and migration tools, and a separate role per integration so a runaway job can be found and stopped.

## Row level security, versions and backups

Row level security lets the database itself decide which rows a user can see or change. The PostgreSQL documentation says that once it is enabled on a table, access must be allowed by a policy, and with no policy nothing is visible. It also says superusers and roles with BYPASSRLS always bypass it, and table owners do too unless FORCE ROW LEVEL SECURITY is set. We write policies from an access matrix, test them as each role, and keep integrations on roles that cannot bypass them unless that is the point.

Versions have an end date. The PostgreSQL project supports each major version for five years, with minor releases at least every three months. Its versioning page lists PostgreSQL 14's final release as 12 November 2026, so databases still on 14 need an upgrade plan now.

Backups depend on where the database runs. Supabase's pricing page in October 2026 lists Pro from $25 a month with daily backups kept for 7 days, point-in-time recovery as an add-on at $100 a month per 7 days of retention, and free projects pausing after a week of inactivity. We set backups and test a restore before go-live.

## Postgres as the main database for other tools

Once data lives in Postgres, other tools read and write it through clear doors. Reporting tools connect with a read-only role to views designed for reporting, so a dashboard change never touches the tables the business runs on. Workflow tools such as n8n use their own role with access to the tables they need. Front ends such as Retool or a custom app use roles that row level security applies to.

We keep an events table for anything that matters operationally: who changed an order, when a payment was matched, which integration wrote a row. It answers the questions that otherwise take an afternoon, and it feeds alerts and summaries elsewhere without slowing the main tables.

Indexes follow the queries people run, checked against real query plans rather than guessed, and slow queries are reviewed as part of care plans.

## How a Postgres engagement with SBD works

Every engagement starts with an [Automation Audit](https://smallbaydigital.com/services/audit/) at $500, credited in full to your build. We review the data, who writes to it, current pain points and growth, and recommend where it should live. Workflow automation builds start at $1,000, internal tools at $3,000, multi-module systems at $5,000 and micro-SaaS products at $10,000. Work runs in two-week sprints with sixty days of hypercare, and care plans from $50 a month cover monitoring, minor upgrades and small changes. See the [pricing page](https://smallbaydigital.com/pricing/).

## What you own, and moving data in

The database, the hosting account and every credential are in your name. You receive a schema document, migration files in version control, the role and policy model, and a runbook for backups, restores and upgrades.

Migrations from a no-code base follow a fixed path: map and clean the data, create the schema, load a copy, compare counts and totals, point integrations at the new database, then cut over with a short edit freeze. Where people want their old screens, a front end such as Retool, Noloco or a custom app sits on the new database.

## At enterprise scale

Postgres runs under a large share of business software, from start-up products to bank systems, either self-managed or on a managed service from a cloud provider or Supabase. In mid-sized companies it often arrives when a no-code base or spreadsheet has outgrown the job, and the question becomes who owns it.

- **Access enforced in the database** Row level security policies are written from an access matrix and tested as each role, with integrations on dedicated roles that do not bypass policies by accident.
- **Connection management** Serverless callers use a transaction-mode pooler with prepared statements off, long-running workers connect directly, and each integration has its own role for tracing.
- **Change control** Schema changes are migration files in version control, reviewed and applied to staging first, with a rollback written before anything reaches production.
- **Backups and recovery** We set backup retention to match your recovery objective, add point-in-time recovery where it is needed, and test a restore before go-live and after major changes.
- **Upgrades on schedule** We track your major version against the PostgreSQL support calendar and plan upgrades well before end of life, tested on a copy first.

### Engagements

- **Already on Airtable, hitting record and speed limits.** We move the heavy tables into Postgres, keep the views people use through a front end, and point integrations at the new database.
- **Already on Postgres, serverless app running out of connections.** We introduce transaction-mode pooling, fix client settings such as prepared statements, and add per-integration roles so heavy callers can be seen and limited.
- **Already on Postgres 14, support ending.** We test the upgrade on a copy, check extensions and client drivers, and run the upgrade in a planned window with a verified backup in hand.

## Related

- [Case study: internal tool on Supabase](https://smallbaydigital.com/case-studies/consulting-internal-tool/)
- [Airtable vs Supabase](https://smallbaydigital.com/compare/airtable-vs-supabase/)
- [Retool vs custom code](https://smallbaydigital.com/compare/retool-vs-custom-code/)
- [Supabase](https://smallbaydigital.com/integrations/tools/supabase/)
- [Supabase portfolio](https://smallbaydigital.com/portfolio/tools/supabase/)
- [Internal tools](https://smallbaydigital.com/services/internal-tools/)

## Sources

- PostgreSQL: PostgreSQL 18 documentation: connections and authentication (max_connections), checked 29 October 2026 <https://www.postgresql.org/docs/current/runtime-config-connection.html>
- PostgreSQL: PostgreSQL 18 documentation: row security policies, checked 29 October 2026 <https://www.postgresql.org/docs/current/ddl-rowsecurity.html>
- PostgreSQL: Versioning policy (five-year support, supported versions), checked 29 October 2026 <https://www.postgresql.org/support/versioning/>
- Supabase Docs: Connect to your database (direct, session and transaction pooling), checked 29 October 2026 <https://supabase.com/docs/guides/database/connecting-to-postgres>
- Supabase: Pricing page (plans, backups, point-in-time recovery, pausing), checked 29 October 2026 <https://supabase.com/pricing>
