PostgreSQL Field Guide

PostgreSQL compatible database guide

Classify Supabase, Neon, YugabyteDB, CockroachDB, Cloudberry, IvorySQL, Materialize, Gel, and FerretDB by PostgreSQL lineage and compatibility

“Built on PostgreSQL,” “uses the PostgreSQL protocol,” and “can replace PostgreSQL” are three different claims. Compatibility has at least five layers:

A driver connects
  → pgwire messages work
    → SQL, types, and functions match
      → catalogs, extensions, and transactions match
        → backup, replication, upgrade, and failure semantics match

Each deeper layer needs migration and failure testing. A PostgreSQL-compatible label usually describes only part of this stack.

Developer platforms centered on PostgreSQL

PlatformWhere PostgreSQL sitsPlatform additionsDo not assume
SupabaseEach project runs PostgreSQLPostgREST, Auth, Realtime, Storage, Functions, Dashboard, and poolingCloud and self-hosted operations are identical, or browser APIs are secure automatically
NeonCompute nodes run the PostgreSQL query layerSeparated compute/storage, page servers, branches, and scale-to-zeroData directory, WAL, unlogged tables, and recovery behave like ordinary PostgreSQL
NhostPostgreSQL is the databaseHasura GraphQL, Auth, Storage, and FunctionsGraphQL permissions are the complete database security boundary
Prisma PostgresManaged PostgreSQLPgBouncer, HTTP/edge driver, query cache, temporary databases, and Prisma toolingOperation billing, pooling, and extensions match every self-hosted installation

These platforms preserve ordinary SQL, migration, and pg_dump thinking, but their connection proxies, sleep behavior, backups, extension allowlists, API permissions, and billing belong in the architecture.

Forks, reused query layers, and new storage

ProjectImplementation pathPrimary targetMigration risk center
YugabyteDBYSQL reuses the PostgreSQL query layer over distributed DocDBDistributed transactions, horizontal scale, and multi-regionExtensions, locks/isolation, catalogs, DDL, and distributed cost model
PolarDB for PostgreSQLCompute/storage-separated PostgreSQL-lineage forkShared storage, one writer/many readers, cloud architectureOpen-source version cadence, specialized storage/HA, and differences from the hosted product
Apache CloudberryGreenplum/PostgreSQL-lineage MPP databaseWarehousing and massively parallel analyticsOLTP transactions, distribution keys, SQL/extensions, and operational tooling
IvorySQLOracle-compatible fork tracking PostgreSQLPL/iSQL, Oracle syntax, packages, and migrationCompatibility mode, Oracle semantics, extension packaging, and upstream synchronization
openGaussIndependent database kernel with PostgreSQL lineageEnterprise deployment, parallelism, and its own ecosystemLong independent evolution means current PostgreSQL compatibility is not a default
OrioleDBNew PostgreSQL storage engine, generally on a supported buildUndo-based MVCC, copy-on-write/checkpointing, and reduced bloat for selected workloadsBinary/build, WAL/backup, extensions, major upgrade, and failure recovery

Lineage is not a drop-in guarantee. Distributed storage in particular changes transaction retries, hot keys, sequences, foreign keys, locks, and consistency/latency tradeoffs.

PostgreSQL clients work, but the server is not PostgreSQL

ProjectRole of pgwire/PostgreSQLActual product
CockroachDBImplements pgwire and much PostgreSQL syntaxIndependent distributed SQL database with different extensions, catalogs, and transaction behavior
MaterializePostgreSQL-compatible drivers query viewsStreaming incremental-compute and live-data layer, not general-purpose OLTP PostgreSQL
GelUses PostgreSQL technology underneath and offers SQL/ecosystem integrationGraph-relational database whose primary model and language are Gel/EdgeQL

server_version can be a compatibility interface

Compatible databases may report a PostgreSQL-like server_version or expose similar catalogs. A version string helps a driver choose a protocol path; it does not prove the same PostgreSQL kernel is running.

FerretDB is compatibility in the opposite direction

FerretDB 2.x accepts MongoDB 5.0+ wire-protocol requests, translates them to SQL, and uses PostgreSQL with the DocumentDB extension as its database engine:

MongoDB driver → FerretDB proxy → PostgreSQL + DocumentDB extension

It is not a PostgreSQL client connecting to a MongoDB-compatible server. It is a MongoDB client using a PostgreSQL-backed document database. Test the MongoDB command/BSON matrix, DocumentDB extension, indexes, transactions, backup, and exact version combination.

Migration compatibility matrix

LayerRequired testsInsufficient evidence
ConnectionTLS, SCRAM, startup parameters, prepared statements, poolingpsql runs SELECT 1
SchemaTypes, identity/sequences, generated columns, constraints, partitionsORM migration succeeds only on an empty database
SQLFunctions/operators, JSONB, CTE/windows, collations, full textBasic CRUD works
TransactionsIsolation, retries, row locks, deadlocks, advisory locksA product page says “ACID”
ExtensionsExact version, operators/index methods, update scriptsThe extension name appears on an allowlist
OperationsBackup/PITR, CDC, replication, catalogs, monitoringA backup button exists
FailureNode/zone failure, connection convergence, RPO/RTO, rollbackVendor benchmarks or an SLA number

Run application tests and migrations first, restore a masked production copy next, and rehearse cutover and rollback last. For distributed databases such as CockroachDB and YugabyteDB, deliberately induce transaction conflicts, hot partitions, and node failures.

Choosing a direction

  • For standard PostgreSQL ecology and minimum migration cost, prefer community PostgreSQL or a managed service that explicitly runs it.
  • For BaaS choose Supabase; for GraphQL-first choose Nhost; for branches and scale-to-zero evaluate Neon.
  • For multi-region distributed OLTP, evaluate YugabyteDB and CockroachDB as new databases, not as settings.
  • For an MPP warehouse, evaluate Cloudberry without extrapolating from OLTP benchmarks.
  • For Oracle migration, evaluate IvorySQL and preserve separate PostgreSQL-mode and Oracle-mode tests.
  • For continuously updated views, Materialize is a data-layer candidate, not a transparent primary-OLTP replacement.

See free PostgreSQL cloud databases for free tiers and PostgreSQL extension selection for actual extensions.

Last updated on

On this page