PostgreSQL Database
Term 22 of 68 in the ERPStack technical glossary
What is PostgreSQL Database?
PostgreSQL is an advanced, open-source object-relational database management system (RDBMS) that supports ACID compliance, complex SQL queries, and resilient scaling for business systems.
PostgreSQL Database at a glance
- Current major
- PostgreSQL 18, released in the 18.x line; majors 14 through 18 are supported upstream
- Support window
- 5 years per major — PostgreSQL 18 has an end-of-life date of 14 November 2030
- Default port
- 5432, per the PostgreSQL documentation for the current release
- Why we default to it
- 1 engine covering relational, JSONB, full-text and geospatial workloads
- Built with
- PostgreSQL 18 accessed through Drizzle ORM 0.45 and TypeScript 5.9 from Next.js 16, hosted on AWS, Vercel or Neon Serverless PostgreSQL, with TimescaleDB where time series appear
- Numbers that matter
- 5 supported majors, 14 to 18; 5 years of support each; port 5432; 1 engine covering relational, JSONB, full-text and geospatial
- Compare with
- MongoDB Atlas, Redis, ClickHouse and TimescaleDB for specialised workloads
- Access layers
- Drizzle ORM or Prisma ORM from TypeScript, with Zod validating at the boundary
How PostgreSQL Database works in production
The ERPStack approach to PostgreSQL Database
We default to PostgreSQL for core ERP transactional data stores, ensuring absolute financial accuracy, resilient indexes, and easy database auditing.
Frequently asked questions about PostgreSQL Database
Why does ERPStack default to a PostgreSQL Database?
Because it removes decisions rather than adding them. A PostgreSQL Database handles relational data, JSONB documents, full-text search and geospatial queries in 1 engine, so a system does not need a second store the moment requirements widen. It is also genuinely open source with no licence risk attached to deployment, and the operational knowledge transfers to any hosting provider you later choose.
Which PostgreSQL version should a new system target?
The current major, unless a dependency says otherwise. PostgreSQL 18 is the current major line and majors 14 through 18 are supported upstream, with PostgreSQL 18 supported until 14 November 2030. Starting on the newest supported release buys the longest runway before a forced upgrade, and major-version upgrades are the kind of work that is easy to schedule and unpleasant to be surprised by.
Is a PostgreSQL Database fast enough for analytics?
Up to a point, and that point is further away than most teams assume. A PostgreSQL Database with correct indexes, partitioning and materialised views serves substantial reporting workloads without a separate system. The signal to add a columnar store such as ClickHouse is measured, not aesthetic: analytical scans are affecting transactional latency and the usual remedies — indexing, partitioning, moving reads to a replica — have already been applied.
How is tenant isolation enforced in Postgres?
With Row-Level Security policies attached to the table. That makes a PostgreSQL Database apply the tenant predicate to every query, including background jobs and ad-hoc sessions, instead of relying on each developer remembering a WHERE clause. Combined with a connection that sets the tenant context, it turns isolation into a database guarantee rather than an application convention that 1 missed filter can defeat.