mrkeyoor.com_
Fri 11 Sept 13:50 UTC
Dataevaluationupdated 11 Sept 2026

postgrest review

PostgREST turns tables, views, and database functions in PostgreSQL into a REST API. It removes much of the usual controller code by making the database schema, permissions, and SQL functions define what clients can read or change.

trackingstars / 7d
Verdict

We did not run PostgREST at commit ed1b7a6 because our lab harness does not support Haskell and the repository has no Dockerfile. Use it when PostgreSQL is already the center of the system and your team is comfortable making views, functions, grants, and row policies the API contract. Choose a conventional application server when business workflows resist a database-shaped interface or the team cannot own database security in detail.

We ran it

Screenshot of postgrest (postgrest.org)

Answers from our run

Did you run postgrest yourself?

No. Its code is Haskell, and it carries no manifest our lab installs from, and no Dockerfile, so there was nothing standard to install, build or test. This review is written from the repository's own documentation.

Who should not use postgrest?

Teams that want authorization rules kept out of PostgreSQL: PostgREST switches into database roles, so grants and row-level policies are central to a safe deployment.

What are the alternatives to postgrest?

pREST, Hasura GraphQL Engine, Directus. Use it when PostgreSQL is already the center of the system and your team is comfortable making views, functions, grants, and row policies the API contract.

Setup3/5No lab run; deployment still needs PostgreSQL roles and a proxy
Docs5/5Configuration, auth, caching, deployment, and errors are documented
Community5/527,655 stars with same-day pushes, issues, and a v16.3 release
Maturity5/5v16.3 follows a long release line and supports PostgreSQL 14+

Who it’s for

PostgreSQL teams that want a REST interface without maintaining a separate CRUD application.
SQL-heavy developers willing to define the API through views, functions, grants, and row-level security.
Platform teams that can operate a stateless service behind a TLS-terminating reverse proxy.
Projects that benefit from an OpenAPI description generated from the live database schema.

Who it’s NOT for

Teams that want authorization rules kept out of PostgreSQL: PostgREST switches into database roles, so grants and row-level policies are central to a safe deployment.
Products expecting PostgREST to issue user sessions or supply a complete login system: it verifies JWTs, while token creation and other authentication flows belong in database functions or an external service.
APIs that must stream several very large responses within a fixed memory ceiling: open issue 4943 reports out-of-memory crashes under that workload and remains labeled needs repro.
Clients that need to choose a timeout for any table, view, or embedded request: issue 4381 says timeouts can be set by role or function, while general per-request control remains open.
Operators who cannot place another HTTP service in front of it: the official guide says PostgREST does not implement HTTPS and relies on a reverse proxy for TLS and added safeguards.

Setup reality

Our lab did not run PostgREST at commit ed1b7a6. Haskell is outside the harness's supported ecosystems, and the repository had no Dockerfile, so we have no install, build, test, dependency, disk, or audit result. The planned sandbox had 3 CPUs, 8 GB of RAM, no secrets, and an unprivileged container.

The official routes are a released binary, a package manager, or the published container image. Serving requests needs PostgreSQL 14 or newer, a database URI, and either an anonymous database role or a JWT secret. Authenticated setups must also define grants, role switching, and row-level policies.

PostgREST does not terminate HTTPS, so production needs a reverse proxy. It caches database metadata, which means DDL changes need a signal, database notification, or event trigger to reload that cache. Operators also have to size the connection pool and check binary compatibility on older Linux hosts.

v16.3 turns PostgreSQL 14+ schemas into REST endpoints

PostgREST v16.3 reads PostgreSQL metadata and exposes tables, views, and functions over HTTP. Tables become collection endpoints, related data can be embedded, and functions can be called as RPCs. The API reflects database privileges rather than maintaining a second permission model in application code. It can also produce an OpenAPI description from the exposed schema. This is appealing when the database already contains the data model and much of the business logic. It is restrictive when an API needs to behave unlike its underlying relations.

The server is deliberately narrow. It translates requests into SQL, lets PostgreSQL validate and serialize results, and keeps little state outside its connection pool and schema cache. Horizontal replicas can therefore share a database without coordinating application sessions. Our proposed lab target was commit ed1b7a6 on 3 CPUs and 8 GB of RAM, but the harness stopped before execution because Haskell was unsupported and the repository lacked a Dockerfile. No local result backs a speed or resource claim on this page.

v16.3 puts authorization inside PostgreSQL roles

PostgREST v16.3 validates a JWT, reads its role claim, and switches to the matching database role for that request. Anonymous traffic uses a separately configured role. Grants control which schemas, tables, columns, and functions the role can access, while PostgreSQL row-level security can restrict individual records. This produces one permission system for direct SQL and HTTP access. A careless grant or security-definer function can expose data just as effectively as a bug in a hand-written controller.

Token creation is a separate job. The documentation shows JWTs produced by a database function or an external identity provider, and PostgREST handles verification. Its JWT secret must be at least 32 characters when symmetric signing is used. HTTPS is also outside the server, with the official deployment guide assigning TLS and extra HTTP safeguards to a reverse proxy. A production review must therefore cover the identity service, proxy, database roles, function execution privileges, and any views whose owner could bypass row-level security.

What happened when we ran it

We did not run PostgREST at commit ed1b7a6. Our sandbox workflow has no supported Haskell ecosystem, and the repository had no Dockerfile for the fallback path. Our run stopped at ecosystem detection, which is the complete lab finding. There is no measured install time, build result, test result, dependency count, disk figure, or vulnerability audit to report.

The measurement method targeted an unprivileged container with no secrets, 3 CPUs, and 8 GB of RAM on September 11, 2026. Execution stopped before PostgREST started or connected to PostgreSQL. The lack of a run should lower confidence in setup claims based on our own evidence. It says nothing about whether upstream release binaries or the separately published container image work on a supported host.

PostgreSQL 14+ is only the start of policy setup

PostgreSQL 14 or newer is required, and the configuration reference says the process cannot serve useful requests until it has an anonymous role or JWT secret. A normal deployment adds a connection URI, an exposed schema, a listening port, and pool settings. Released binaries cover macOS, Windows, Linux, and FreeBSD, while the installation guide also points to an official container image. The executable may be simple to launch; the grants and row policies determine whether it is safe to expose.

Schema metadata is cached. After DDL changes, operators can send a Unix signal, issue a PostgreSQL notification, or install an event trigger that requests a reload. If a reload fails, the documentation says PostgREST continues on a best-effort basis with the existing cache. That behavior deserves monitoring because a migration can succeed while the HTTP view stays old. The planned 3-CPU, 8 GB lab did not exercise reloads, pool exhaustion, failover, or proxy behavior.

v16.3 still has open reports about response limits

PostgREST v16.3 has an open report about out-of-memory crashes when several clients request large result sets because responses are buffered. Issue 4943 is labeled needs repro, so it identifies a workload to test rather than proving a universal defect. Put row limits, pagination, statement timeouts, and memory monitoring in the acceptance plan. A generated endpoint makes broad queries easy to express; database permissions alone do not stop an authorized client from asking for too much data.

Timeout control also has a boundary. Issue 4381 says administrators can set statement_timeout per role and per function, while a caller cannot generally choose it for a table, view, or resource-embedding request. Issue 4608 describes another limitation: choosing an API schema from a JWT claim for hidden tenant routing is still a proposal. These are specific constraints, not signs of inactivity. GitHub listed 404 combined open issues and pull requests, including active design and maintenance discussions on September 11, 2026.

The September 11 release shows active maintenance

PostgREST v16.3 was published on September 11, 2026, the same date as the repository's latest push. Its notes list fixes for sporadic JWT issued-in-the-future errors and incorrect log times after long idle periods. GitHub showed 27,655 stars and 404 combined open issues and pull requests when fetched. The large queue needs triage during evaluation, although same-day code, release, and issue activity show that maintainers and users are still working in public.

The decision depends less on endpoint generation than on where your team wants complexity to live. PostgREST removes repetitive CRUD handlers, then asks PostgreSQL views, functions, roles, and policies to carry the contract. That is a good exchange for experienced database teams with a relational API. It is a poor one for developers who need custom request orchestration, prefer authorization in application code, or cannot test large-response memory behavior on their own workload.

Alternatives

ProjectWhat it isPick it when
pRESTA Go server that exposes PostgreSQL through REST, custom SQL routes, ACLs, and an MCP endpoint.pick this instead when Go deployment, custom query files, multi-database routing, or built-in MCP access matters.
Hasura GraphQL EngineA data API engine centered on GraphQL, subscriptions, permissions, and event-driven extensions.pick this instead when clients need GraphQL and subscriptions or your API spans several supported data sources.
Directus gh↗A database-backed REST and GraphQL platform with a visual administration studio.pick this instead when non-developers need a content interface and its current source-available license fits your organization.

What people are saying

  1. [velocity-scout] PostgREST/postgrest

Sources

  1. PostgREST README
  2. PostgREST installation guide
  3. PostgREST database authorization guide
  4. PostgREST schema cache guide
  5. Open issue 4943: memory use with large results
  6. Open issue 4381: per-request timeout
  7. Open issue 4608: schema selection from JWT claims
  8. PostgREST v16.3 release

More data reviews

shulihuazixuecongshu · rocketmq · free-programming-books · Ontology-Playground · awesome-osint · data-engineering-zoomcamp · the whole board →