You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This guide covers getting up and running with Supabase Postgres. After reading this guide, you will understand:
4
+
5
+
* What Supabase Postgres provides and why you might want to use it
6
+
* How the project is organized and what each directory contains
7
+
* How to build and run Postgres with extensions locally
8
+
* The basics of working with the extension ecosystem
9
+
10
+
---
11
+
12
+
## What is Supabase Postgres?
13
+
14
+
Supabase Postgres is a batteries-included PostgreSQL distribution that provides unmodified PostgreSQL with a curated set of the most useful extensions pre-installed. Think of it as PostgreSQL with superpowers - you get the reliability and power of standard PostgreSQL, plus immediate access to extensions for tasks like:
15
+
16
+
* Full-text search and indexing
17
+
* Geospatial data processing
18
+
* Time-series data management
19
+
* JSON validation and GraphQL support
20
+
* Cryptography and security
21
+
* Message queuing
22
+
* And much more
23
+
24
+
The goal is simple: make it fast and easy to get started with a production-ready PostgreSQL setup without having to hunt down, compile, and configure dozens of extensions yourself.
25
+
26
+
## Philosophy
27
+
28
+
Supabase Postgres follows these core principles:
29
+
30
+
1.**Unmodified PostgreSQL** - We don't fork or modify PostgreSQL itself. You get standard PostgreSQL with extensions.
31
+
2.**Curated Extensions** - We include well-maintained, production-tested extensions that solve real problems.
32
+
3.**Multi-version Support** - Currently supporting PostgreSQL 15, 17, and OrioleDB-17.
33
+
4.**Ready for Production** - Configured with sensible defaults for replication, security, and performance.
34
+
5.**Open Source** - Everything is open source and can be self-hosted.
35
+
36
+
## Directory Structure
37
+
38
+
Here's a comprehensive overview of the project's directory structure:
39
+
40
+
| File/Directory | Purpose |
41
+
| -------------- | ------- |
42
+
|**nix/**| Core build system directory containing all Nix expressions for building PostgreSQL and extensions |
43
+
| nix/postgresql/ | PostgreSQL version configurations, patches, and base package definitions |
| .envrc.recommended | Recommended environment variables for development |
86
+
| ansible.cfg | Ansible configuration |
87
+
| amazon-arm64-nix.pkr.hcl | Packer configuration for AWS ARM64 builds |
88
+
| common-nix.vars.pkr.hcl | Common Packer variables |
89
+
| development-arm.vars.pkr.hcl | ARM development environment variables |
90
+
| CONTRIBUTING.md | Contribution guidelines |
91
+
| README.md | Main project documentation |
92
+
93
+
## Key Concepts
94
+
95
+
### Extensions
96
+
97
+
Extensions are the superpower of PostgreSQL. They add functionality without modifying the core database. Supabase Postgres includes dozens of pre-built extensions covering:
Now that you understand the basics of Supabase Postgres:
166
+
167
+
* Check the [Installation Guide](https://github.com/supabase/postgres/wiki) for deployment options
168
+
* Explore the [Extension Documentation](#) to learn about available extensions
169
+
* Review [Contributing Guidelines](CONTRIBUTING.md) if you want to contribute
170
+
* Join the [Supabase Community](https://github.com/supabase/postgres/discussions) for questions and discussions
171
+
172
+
## Getting Help
173
+
174
+
***GitHub Issues** - For bugs and feature requests
175
+
***Discussions** - For questions and general discussion
176
+
***Wiki** - For detailed documentation
177
+
***Discord** - For real-time chat with the community
178
+
179
+
---
180
+
181
+
This is the same PostgreSQL build that powers [Supabase](https://supabase.io), battle-tested in production by over one million projects.
2
182
3
-
Unmodified Postgres with some useful plugins. Our goal with this repo is not to modify Postgres, but to provide some of the most common extensions with a one-click install.
|[hypopg](https://github.com/HypoPG/hypopg/archive/refs/tags/1.4.1.tar.gz)|[1.4.1](https://github.com/HypoPG/hypopg/archive/refs/tags/1.4.1.tar.gz)| Hypothetical Indexes for PostgreSQL |
196
+
|[http]()|[1.6]()||
197
+
|[hypopg]()|[1.4.1]()||
18
198
|[index_advisor]()|[0.2.0]()||
19
199
|[pg-safeupdate](https://github.com/eradman/pg-safeupdate/archive/1.4.tar.gz)|[1.4](https://github.com/eradman/pg-safeupdate/archive/1.4.tar.gz)| A simple extension to PostgreSQL that requires criteria for UPDATE and DELETE |
20
200
|[pg_cron]()|[1.6.4]()| Run Cron jobs through PostgreSQL (multi-version compatible) |
@@ -31,15 +211,14 @@ Unmodified Postgres with some useful plugins. Our goal with this repo is not to
31
211
|[pgmq](https://github.com/tembo-io/pgmq/archive/v1.4.4.tar.gz)|[1.4.4](https://github.com/tembo-io/pgmq/archive/v1.4.4.tar.gz)| A lightweight message queue. Like AWS SQS and RSMQ but on Postgres. |
32
212
|[pgroonga](https://packages.groonga.org/source/pgroonga/pgroonga-3.2.5.tar.gz)|[3.2.5](https://packages.groonga.org/source/pgroonga/pgroonga-3.2.5.tar.gz)| A PostgreSQL extension to use Groonga as the index |
33
213
|[pgrouting](https://github.com/pgRouting/pgrouting/archive/v3.4.1.tar.gz)|[3.4.1](https://github.com/pgRouting/pgrouting/archive/v3.4.1.tar.gz)| A PostgreSQL/PostGIS extension that provides geospatial routing functionality |
34
-
|[pgsodium](https://github.com/michelp/pgsodium/archive/refs/tags/v3.1.8.tar.gz)|[3.1.8](https://github.com/michelp/pgsodium/archive/refs/tags/v3.1.8.tar.gz)| Modern cryptography for PostgreSQL |
35
-
|[pgsql-http](https://github.com/pramsey/pgsql-http/archive/refs/tags/v1.6.1.tar.gz)|[1.6.1](https://github.com/pramsey/pgsql-http/archive/refs/tags/v1.6.1.tar.gz)| HTTP client for Postgres |
214
+
|[pgsodium]()|[3.1.8]()||
36
215
|[pgtap](https://github.com/theory/pgtap/archive/v1.2.0.tar.gz)|[1.2.0](https://github.com/theory/pgtap/archive/v1.2.0.tar.gz)| A unit testing framework for PostgreSQL |
37
216
|[plpgsql-check](https://github.com/okbob/plpgsql_check/archive/v2.7.11.tar.gz)|[2.7.11](https://github.com/okbob/plpgsql_check/archive/v2.7.11.tar.gz)| Linter tool for language PL/pgSQL |
38
217
|[plv8](https://github.com/plv8/plv8/archive/v3.1.10.tar.gz)|[3.1.10](https://github.com/plv8/plv8/archive/v3.1.10.tar.gz)| V8 Engine Javascript Procedural Language add-on for PostgreSQL |
39
218
|[postgis](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz)|[3.3.7](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz)| Geographic Objects for PostgreSQL |
40
-
|[rum](https://github.com/postgrespro/rum/archive/1.3.14.tar.gz)|[1.3.14](https://github.com/postgrespro/rum/archive/1.3.14.tar.gz)|Full text search index method for PostgreSQL|
219
+
|[rum]()|[1.3]()||
41
220
|[supautils](https://github.com/supabase/supautils/archive/refs/tags/v2.9.4.tar.gz)|[2.9.4](https://github.com/supabase/supautils/archive/refs/tags/v2.9.4.tar.gz)| PostgreSQL extension for enhanced security |
42
-
|[timescaledb-apache](https://github.com/timescale/timescaledb/archive/2.16.1.tar.gz)|[2.16.1](https://github.com/timescale/timescaledb/archive/2.16.1.tar.gz)|Scales PostgreSQL for time-series data via automatic partitioning across time and space|
221
+
|[timescaledb]()|[2.9.1]()||
43
222
|[vault](https://github.com/supabase/vault/archive/refs/tags/v0.3.1.tar.gz)|[0.3.1](https://github.com/supabase/vault/archive/refs/tags/v0.3.1.tar.gz)| Store encrypted secrets in PostgreSQL |
44
223
|[vector]()|[0.8.0]()||
45
224
|[wal2json](https://github.com/eulerto/wal2json/archive/wal2json_2_6.tar.gz)|[2_6](https://github.com/eulerto/wal2json/archive/wal2json_2_6.tar.gz)| PostgreSQL JSON output plugin for changeset extraction |
@@ -48,7 +227,8 @@ Unmodified Postgres with some useful plugins. Our goal with this repo is not to
|[hypopg](https://github.com/HypoPG/hypopg/archive/refs/tags/1.4.1.tar.gz)|[1.4.1](https://github.com/HypoPG/hypopg/archive/refs/tags/1.4.1.tar.gz)| Hypothetical Indexes for PostgreSQL |
230
+
|[http]()|[1.6]()||
231
+
|[hypopg]()|[1.4.1]()||
52
232
|[index_advisor]()|[0.2.0]()||
53
233
|[pg-safeupdate](https://github.com/eradman/pg-safeupdate/archive/1.4.tar.gz)|[1.4](https://github.com/eradman/pg-safeupdate/archive/1.4.tar.gz)| A simple extension to PostgreSQL that requires criteria for UPDATE and DELETE |
54
234
|[pg_cron]()|[1.6.4]()| Run Cron jobs through PostgreSQL (multi-version compatible) |
@@ -65,12 +245,11 @@ Unmodified Postgres with some useful plugins. Our goal with this repo is not to
65
245
|[pgmq](https://github.com/tembo-io/pgmq/archive/v1.4.4.tar.gz)|[1.4.4](https://github.com/tembo-io/pgmq/archive/v1.4.4.tar.gz)| A lightweight message queue. Like AWS SQS and RSMQ but on Postgres. |
66
246
|[pgroonga](https://packages.groonga.org/source/pgroonga/pgroonga-3.2.5.tar.gz)|[3.2.5](https://packages.groonga.org/source/pgroonga/pgroonga-3.2.5.tar.gz)| A PostgreSQL extension to use Groonga as the index |
67
247
|[pgrouting](https://github.com/pgRouting/pgrouting/archive/v3.4.1.tar.gz)|[3.4.1](https://github.com/pgRouting/pgrouting/archive/v3.4.1.tar.gz)| A PostgreSQL/PostGIS extension that provides geospatial routing functionality |
68
-
|[pgsodium](https://github.com/michelp/pgsodium/archive/refs/tags/v3.1.8.tar.gz)|[3.1.8](https://github.com/michelp/pgsodium/archive/refs/tags/v3.1.8.tar.gz)| Modern cryptography for PostgreSQL |
69
-
|[pgsql-http](https://github.com/pramsey/pgsql-http/archive/refs/tags/v1.6.1.tar.gz)|[1.6.1](https://github.com/pramsey/pgsql-http/archive/refs/tags/v1.6.1.tar.gz)| HTTP client for Postgres |
248
+
|[pgsodium]()|[3.1.8]()||
70
249
|[pgtap](https://github.com/theory/pgtap/archive/v1.2.0.tar.gz)|[1.2.0](https://github.com/theory/pgtap/archive/v1.2.0.tar.gz)| A unit testing framework for PostgreSQL |
71
250
|[plpgsql-check](https://github.com/okbob/plpgsql_check/archive/v2.7.11.tar.gz)|[2.7.11](https://github.com/okbob/plpgsql_check/archive/v2.7.11.tar.gz)| Linter tool for language PL/pgSQL |
72
251
|[postgis](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz)|[3.3.7](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz)| Geographic Objects for PostgreSQL |
73
-
|[rum](https://github.com/postgrespro/rum/archive/1.3.14.tar.gz)|[1.3.14](https://github.com/postgrespro/rum/archive/1.3.14.tar.gz)|Full text search index method for PostgreSQL|
252
+
|[rum]()|[1.3]()||
74
253
|[supautils](https://github.com/supabase/supautils/archive/refs/tags/v2.9.4.tar.gz)|[2.9.4](https://github.com/supabase/supautils/archive/refs/tags/v2.9.4.tar.gz)| PostgreSQL extension for enhanced security |
75
254
|[vault](https://github.com/supabase/vault/archive/refs/tags/v0.3.1.tar.gz)|[0.3.1](https://github.com/supabase/vault/archive/refs/tags/v0.3.1.tar.gz)| Store encrypted secrets in PostgreSQL |
76
255
|[vector]()|[0.8.0]()||
@@ -80,7 +259,8 @@ Unmodified Postgres with some useful plugins. Our goal with this repo is not to
|[pg-safeupdate](https://github.com/eradman/pg-safeupdate/archive/1.4.tar.gz)|[1.4](https://github.com/eradman/pg-safeupdate/archive/1.4.tar.gz)| A simple extension to PostgreSQL that requires criteria for UPDATE and DELETE |
@@ -98,12 +278,11 @@ Unmodified Postgres with some useful plugins. Our goal with this repo is not to
98
278
|[pgmq](https://github.com/tembo-io/pgmq/archive/v1.4.4.tar.gz)|[1.4.4](https://github.com/tembo-io/pgmq/archive/v1.4.4.tar.gz)| A lightweight message queue. Like AWS SQS and RSMQ but on Postgres. |
99
279
|[pgroonga](https://packages.groonga.org/source/pgroonga/pgroonga-3.2.5.tar.gz)|[3.2.5](https://packages.groonga.org/source/pgroonga/pgroonga-3.2.5.tar.gz)| A PostgreSQL extension to use Groonga as the index |
100
280
|[pgrouting](https://github.com/pgRouting/pgrouting/archive/v3.4.1.tar.gz)|[3.4.1](https://github.com/pgRouting/pgrouting/archive/v3.4.1.tar.gz)| A PostgreSQL/PostGIS extension that provides geospatial routing functionality |
101
-
|[pgsodium](https://github.com/michelp/pgsodium/archive/refs/tags/v3.1.8.tar.gz)|[3.1.8](https://github.com/michelp/pgsodium/archive/refs/tags/v3.1.8.tar.gz)| Modern cryptography for PostgreSQL |
102
-
|[pgsql-http](https://github.com/pramsey/pgsql-http/archive/refs/tags/v1.6.1.tar.gz)|[1.6.1](https://github.com/pramsey/pgsql-http/archive/refs/tags/v1.6.1.tar.gz)| HTTP client for Postgres |
281
+
|[pgsodium]()|[3.1.8]()||
103
282
|[pgtap](https://github.com/theory/pgtap/archive/v1.2.0.tar.gz)|[1.2.0](https://github.com/theory/pgtap/archive/v1.2.0.tar.gz)| A unit testing framework for PostgreSQL |
104
283
|[plpgsql-check](https://github.com/okbob/plpgsql_check/archive/v2.7.11.tar.gz)|[2.7.11](https://github.com/okbob/plpgsql_check/archive/v2.7.11.tar.gz)| Linter tool for language PL/pgSQL |
105
284
|[postgis](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz)|[3.3.7](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz)| Geographic Objects for PostgreSQL |
106
-
|[rum](https://github.com/postgrespro/rum/archive/1.3.14.tar.gz)|[1.3.14](https://github.com/postgrespro/rum/archive/1.3.14.tar.gz)|Full text search index method for PostgreSQL|
285
+
|[rum]()|[1.3]()||
107
286
|[supautils](https://github.com/supabase/supautils/archive/refs/tags/v2.9.4.tar.gz)|[2.9.4](https://github.com/supabase/supautils/archive/refs/tags/v2.9.4.tar.gz)| PostgreSQL extension for enhanced security |
108
287
|[vault](https://github.com/supabase/vault/archive/refs/tags/v0.3.1.tar.gz)|[0.3.1](https://github.com/supabase/vault/archive/refs/tags/v0.3.1.tar.gz)| Store encrypted secrets in PostgreSQL |
109
288
|[vector]()|[0.8.0]()||
@@ -118,6 +297,7 @@ Unmodified Postgres with some useful plugins. Our goal with this repo is not to
118
297
|[PostgREST](https://postgrest.org/en/stable/)|[v13.0.4](https://github.com/PostgREST/postgrest/releases/tag/v13.0.4)| Instantly transform your database into an RESTful API. |
119
298
| [WAL-G](https://github.com/wal-g/wal-g#wal-g) | [v2.0.1](https://github.com/wal-g/wal-g/releases/tag/v2.0.1) | Tool for physical database backup and recovery. | -->
120
299
300
+
121
301
## Install
122
302
123
303
See all installation instructions in the [repo wiki](https://github.com/supabase/postgres/wiki).
0 commit comments