Comparison: DuckDB vs PostgreSQLModified date: Monday, June 30, 2025
| Feature | DuckDB | PostgreSQL | Definition |
|---|---|---|---|
| intro | DuckDB is an in-process SQL OLAP database management system. Simple, feature-rich, fast & open source. | PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance. | |
| vendor | DuckDB Lab | PostgreSQL Committees | |
| initial release | 2018 | 1998 | |
| latested version | 1.3.0 "Ossivalis" | 17 | |
| supported platforms | all major OS (Linux, macOS, Windows) and CPU (x86, ARM) | x86, PowerPC, S/390, SPARC, ARM, MIPS, RISC-V, and PA-RISC | |
| db-engines ranking | 45 | 4 | |
| relational? | yes | yes | |
| open source? | yes | yes | |
| license | MIT | ||
| price: box software | 0 | 0 | |
| on-premise offering | yes | yes | |
| cloud offering | cloud vendors | ||
| technical doc | https://duckdb.org/docs/stable/ | www.postgresql.org/docs |
| Feature | DuckDB | PostgreSQL | Definition |
|---|---|---|---|
| SQL: standard complaince | high | high | |
| Extension Mechanism | DuckDB Extensions | C programming, link with engine | |
| max SQL length | |||
| PL: main | SQL + PL/PgSQL | ||
| PL: other language support | yes | ||
| SP: max parameters | 100 | ||
| UDF: max parameters | 100 | ||
| SQL: max parameters | 65535 | ||
| SQL: query hints | GUC only | ||
| SQL: explicit locking | yes: row, page, table level | ||
| Triggers? | yes | ||
| Triggers: scope | tables, views, foreign tables | ||
| Triggers: type | BEFORE, AFTER, INSTEAD OF | ||
| Object-Relational? | yes | ||
| vector search | no native |
| Feature | DuckDB | PostgreSQL | Definition |
|---|---|---|---|
| arch: server | Embedded | C/S | |
| arch: run in browser? | yes | no/yes | |
| ACID: durability | yes | yes | |
| Materialized View: support? | no | yes | |
| arch: in-memory support | no | ||
| arch: Multi-master support? | no | ||
| arch: primary/read replica? | yes | ||
| replication: sync/async | both | ||
| replication: WAL shipping | yes | ||
| replication: quorum-based commit | no | ||
| database: max number | |||
| tables: max number per database | 1,431,650,303 | ||
| partitions: methods | Range, List, Hash; limited composite (multi-level partitioning more limited than Oracle/SQL Server). | ||
| partitions: global index | no | ||
| rows: max rows per table | 32T/row_size | ||
| index: max allowed index | rows per table is restricted by the number of rows that can fit onto MAX_UINT*8K pages. | ||
| ACID | yes/yes | ||
| ACID: max isolation level | |||
| ACID: max ANSI isolation level | Serializable |
| Feature | DuckDB | PostgreSQL | Definition |
|---|---|---|---|
| any official TPC benchmarks? | no | no |
| Feature | DuckDB | PostgreSQL | Definition |
|---|---|---|---|
| command line client | duckdb | psql | |
| admin(GUI) | pgAdmin |
Both are open source databases, so they are easy with export regulations.
| Feature | DuckDB | PostgreSQL | Definition |
|---|---|---|---|
| Jurisdiction | US | US | |
| ECCN | None | None | |
| Eligible License Exception / CCATS | Not required | Not required | |
| Encryption Components | SSL | SSL |
| Feature | DuckDB | PostgreSQL | Definition |
|---|---|---|---|
| Implementation language | C | ||
| concurrency control | MVCC | ||
| MVCC: implemented? | yes | ||
| MVCC: rollback segment | no |
| Feature | DuckDB | PostgreSQL | Definition |
|---|---|---|---|
| CBO? | yes | ||
| framework | System-R | ||
| join order search | dynamic programming + Generic Algorithm (GEQO) | ||
| stats: multi column | yes | ||
| query hints? | GUC only | ||
| plan guide? | no |
| Feature | DuckDB | PostgreSQL | Definition |
|---|---|---|---|
| resource management | simple: work_mem controls per-operator memory use | ||
| spilling support | yes | ||
| model | Volcano + push for parallel run | ||
| support intra-parallel query? | yes | ||
| adaptive execution (AQP)? | no | ||
| vectorization | no native | ||
| iterator: join methods | all 3 | ||
| Error: out-of-range and overflow | abort the transaction |
| Feature | DuckDB | PostgreSQL | Definition |
|---|---|---|---|
| ACID: durability mechanism | WAL | WAL | |
| Page Size | 8K default | ||
| Storage Compression | TOAST compression (within a row) | ||
| Row Overflow / Large Row Handling | Row within a page and large columns pointing to TOAST storage | ||
| Index: primary cluster | Heap storage by default; CLUSTER command for static clustering - if modification happens after, order is not maintained. | ||
| Index: secondary | B+Tree, GIN, GiST, SP-GiST, BRIN, Hash, Fulltext (via extensions). | ||
| index: column store as primary | No native support; available via extensions (e.g. cstore_fdw, citus). | ||
| index: column store as secondary | No native support; available via extensions (e.g. cstore_fdw, citus). | ||
| partition table | declarative partition table is implemented via inheritance table, since V11 | ||
| partition table: prunning | mostly at compile time, some runtime |