supabase-postgres.git / summary / log / commit / refs

commit    2678fc8cd70d07580d8d2faff2bf0e4d8f7cba0b
Author:   Márton Boros <martonboros@gmail.com>
Commit:   GitHub <noreply@github.com>
Date:     Tue Jul 21 21:28:53 2026 +0000

    docs: fix stale docs (dead wiki links, nix structure, migration-test and build examples) (#2286)
    
    * docs(readme): replace dead wiki links with nix docs
    
    The repo wiki is disabled, so all wiki links redirected back to the
    repo homepage. Point installation and documentation references at the
    in-repo nix docs instead, and drop the AWS badge which has no in-repo
    equivalent.
    
    Fixes #1501
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    
    * docs(nix): fix stale nix/ext/default.nix reference in directory structure doc
    
    The extension registry (ourExtensions) lives in nix/packages/postgres.nix;
    nix/ext/default.nix no longer exists. Applies the diff suggested in the issue.
    
    Fixes #1957
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    
    * docs(nix): fix broken migration-test example
    
    The arbitrary-version example never printed a store path (nix build
    needs --print-out-paths), referenced the old nix-postgres repo name,
    and used psql_14.bin — PG 14 is no longer built and the attribute is
    now psql_15/bin.
    
    Fixes #1096
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    
    * docs(nix): fix build example referencing unbuilt PG 16
    
    This repo builds 15, 17 and orioledb-17; the example pointed at
    psql_16 (and its sample output at 14.8).
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    
    * fix(docs): update versions and contents in docs
    
    ---------
    
    Co-authored-by: Claude Fable 5 <noreply@anthropic.com>


README.md | 9 ++- nix/docs/build-postgres.md | 135 ++++++++++++++++++++---------------- nix/docs/migration-tests.md | 10 +-- nix/docs/nix-directory-structure.md | 2 +- 4 files changed, 87 insertions(+), 69 deletions(-) diff --git a/README.md b/README.md index ad314ff8..773763b2 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ docker build -f Dockerfile-17 -t supabase-postgres:17 . Now that you understand the basics of Supabase Postgres: -* Check the [Installation Guide](https://github.com/supabase/postgres/wiki) for deployment options +* Check the [build guide](nix/docs/build-postgres.md) and [Docker docs](nix/docs/docker.md) for deployment options * Explore the [Extension Documentation](#) to learn about available extensions * Review [Contributing Guidelines](CONTRIBUTING.md) if you want to contribute * Join the [Supabase Community](https://github.com/supabase/postgres/discussions) for questions and discussions @@ -174,7 +174,7 @@ Now that you understand the basics of Supabase Postgres: * **GitHub Issues** - For bugs and feature requests * **Discussions** - For questions and general discussion -* **Wiki** - For detailed documentation +* **[nix/docs](nix/docs/README.md)** - For detailed documentation * **Discord** - For real-time chat with the community --- @@ -301,10 +301,9 @@ This is the same PostgreSQL build that powers [Supabase](https://supabase.io), b ## Install -See all installation instructions in the [repo wiki](https://github.com/supabase/postgres/wiki). +See the [documentation index](nix/docs/README.md) for installation instructions. -[![Docker](https://github.com/supabase/postgres/blob/develop/docs/img/docker.png)](https://github.com/supabase/postgres/wiki/Docker) -[![AWS](https://github.com/supabase/postgres/blob/develop/docs/img/aws.png)](https://github.com/supabase/postgres/wiki/AWS-EC2) +[![Docker](https://github.com/supabase/postgres/blob/develop/docs/img/docker.png)](nix/docs/docker.md) <!-- ### Marketplace Images TODO: find way to automate this diff --git a/nix/docs/build-postgres.md b/nix/docs/build-postgres.md index 11624fd8..81a05aaa 100644 --- a/nix/docs/build-postgres.md +++ b/nix/docs/build-postgres.md @@ -20,7 +20,7 @@ nix build .#psql_15.bin ``` $ readlink result -/nix/store/ybf48481x033649mgdzk5dyaqv9dppzx-postgresql-and-plugins-15.3 +/nix/store/zr238w2hwryn8dgs81l2p84clmrm36vx-postgresql-and-plugins-15.14 ``` ``` @@ -29,58 +29,77 @@ bin include lib share ``` ``` -$ ll result/bin/ -total 9928 -dr-xr-xr-x 2 root root 4096 Dec 31 1969 ./ -dr-xr-xr-x 5 root root 4096 Dec 31 1969 ../ -lrwxrwxrwx 1 root root 79 Dec 31 1969 .initdb-wrapped -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/.initdb-wrapped* --r-xr-xr-x 1 root root 9829624 Dec 31 1969 .postgres-wrapped* -lrwxrwxrwx 1 root root 73 Dec 31 1969 clusterdb -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/clusterdb* -lrwxrwxrwx 1 root root 72 Dec 31 1969 createdb -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/createdb* -lrwxrwxrwx 1 root root 74 Dec 31 1969 createuser -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/createuser* -lrwxrwxrwx 1 root root 70 Dec 31 1969 dropdb -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/dropdb* -lrwxrwxrwx 1 root root 72 Dec 31 1969 dropuser -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/dropuser* -lrwxrwxrwx 1 root root 68 Dec 31 1969 ecpg -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/ecpg* -lrwxrwxrwx 1 root root 70 Dec 31 1969 initdb -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/initdb* -lrwxrwxrwx 1 root root 72 Dec 31 1969 oid2name -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/oid2name* -lrwxrwxrwx 1 root root 74 Dec 31 1969 pg_amcheck -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_amcheck* -lrwxrwxrwx 1 root root 81 Dec 31 1969 pg_archivecleanup -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_archivecleanup* -lrwxrwxrwx 1 root root 77 Dec 31 1969 pg_basebackup -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_basebackup* -lrwxrwxrwx 1 root root 76 Dec 31 1969 pg_checksums -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_checksums* --r-xr-xr-x 1 root root 53432 Dec 31 1969 pg_config* -lrwxrwxrwx 1 root root 78 Dec 31 1969 pg_controldata -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_controldata* --r-xr-xr-x 1 root root 82712 Dec 31 1969 pg_ctl* -lrwxrwxrwx 1 root root 71 Dec 31 1969 pg_dump -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_dump* -lrwxrwxrwx 1 root root 74 Dec 31 1969 pg_dumpall -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_dumpall* -lrwxrwxrwx 1 root root 74 Dec 31 1969 pg_isready -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_isready* -lrwxrwxrwx 1 root root 77 Dec 31 1969 pg_receivewal -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_receivewal* -lrwxrwxrwx 1 root root 78 Dec 31 1969 pg_recvlogical -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_recvlogical* -lrwxrwxrwx 1 root root 73 Dec 31 1969 pg_repack -> /nix/store/bi9i5ns4cqxk235qz3srs9p4x1qfxfna-pg_repack-1.4.8/bin/pg_repack* -lrwxrwxrwx 1 root root 75 Dec 31 1969 pg_resetwal -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_resetwal* -lrwxrwxrwx 1 root root 74 Dec 31 1969 pg_restore -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_restore* -lrwxrwxrwx 1 root root 73 Dec 31 1969 pg_rewind -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_rewind* -lrwxrwxrwx 1 root root 77 Dec 31 1969 pg_test_fsync -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_test_fsync* -lrwxrwxrwx 1 root root 78 Dec 31 1969 pg_test_timing -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_test_timing* -lrwxrwxrwx 1 root root 74 Dec 31 1969 pg_upgrade -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_upgrade* -lrwxrwxrwx 1 root root 79 Dec 31 1969 pg_verifybackup -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_verifybackup* -lrwxrwxrwx 1 root root 74 Dec 31 1969 pg_waldump -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_waldump* -lrwxrwxrwx 1 root root 71 Dec 31 1969 pgbench -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pgbench* -lrwxrwxrwx 1 root root 71 Dec 31 1969 pgsql2shp -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/pgsql2shp* -lrwxrwxrwx 1 root root 77 Dec 31 1969 pgsql2shp-3.3.3 -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/pgsql2shp-3.3.3* -lrwxrwxrwx 1 root root 75 Dec 31 1969 pgtopo_export -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/pgtopo_export* -lrwxrwxrwx 1 root root 81 Dec 31 1969 pgtopo_export-3.3.3 -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/pgtopo_export-3.3.3* -lrwxrwxrwx 1 root root 75 Dec 31 1969 pgtopo_import -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/pgtopo_import* -lrwxrwxrwx 1 root root 81 Dec 31 1969 pgtopo_import-3.3.3 -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/pgtopo_import-3.3.3* --r-xr-xr-x 1 root root 286 Dec 31 1969 postgres* -lrwxrwxrwx 1 root root 74 Dec 31 1969 postmaster -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/postmaster* -lrwxrwxrwx 1 root root 68 Dec 31 1969 psql -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/psql* -lrwxrwxrwx 1 root root 74 Dec 31 1969 raster2pgsql -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/raster2pgsql* -lrwxrwxrwx 1 root root 80 Dec 31 1969 raster2pgsql-3.3.3 -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/raster2pgsql-3.3.3* -lrwxrwxrwx 1 root root 73 Dec 31 1969 reindexdb -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/reindexdb* -lrwxrwxrwx 1 root root 71 Dec 31 1969 shp2pgsql -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/shp2pgsql* -lrwxrwxrwx 1 root root 77 Dec 31 1969 shp2pgsql-3.3.3 -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/shp2pgsql-3.3.3* -lrwxrwxrwx 1 root root 72 Dec 31 1969 vacuumdb -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/vacuumdb* -lrwxrwxrwx 1 root root 72 Dec 31 1969 vacuumlo -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/vacuumlo* +me@mek:~/supabase/postgres/ > ls -la result/bin/ +... +dr-xr-xr-x 69 root wheel 2208 Jan 1 1970 . +dr-xr-xr-x 7 root wheel 224 Jan 1 1970 .. +lrwxr-xr-x 1 root wheel 94 Jan 1 1970 .postgres-wrapped -> /nix/store/b1l8r414zsgsy78j63f0k6qb1wy0z8bf-postgresql-and-plugins-15.14/bin/.postgres-wrapped +lrwxr-xr-x 1 root wheel 74 Jan 1 1970 clusterdb -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/clusterdb +lrwxr-xr-x 1 root wheel 73 Jan 1 1970 createdb -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/createdb +lrwxr-xr-x 1 root wheel 75 Jan 1 1970 createuser -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/createuser +lrwxr-xr-x 1 root wheel 71 Jan 1 1970 dropdb -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/dropdb +lrwxr-xr-x 1 root wheel 73 Jan 1 1970 dropuser -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/dropuser +lrwxr-xr-x 1 root wheel 69 Jan 1 1970 ecpg -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/ecpg +lrwxr-xr-x 1 root wheel 71 Jan 1 1970 initdb -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/initdb +lrwxr-xr-x 1 root wheel 73 Jan 1 1970 oid2name -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/oid2name +lrwxr-xr-x 1 root wheel 75 Jan 1 1970 pg_amcheck -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_amcheck +lrwxr-xr-x 1 root wheel 82 Jan 1 1970 pg_archivecleanup -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_archivecleanup +lrwxr-xr-x 1 root wheel 78 Jan 1 1970 pg_basebackup -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_basebackup +lrwxr-xr-x 1 root wheel 77 Jan 1 1970 pg_checksums -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_checksums +lrwxr-xr-x 1 root wheel 86 Jan 1 1970 pg_config -> /nix/store/b1l8r414zsgsy78j63f0k6qb1wy0z8bf-postgresql-and-plugins-15.14/bin/pg_config +lrwxr-xr-x 1 root wheel 79 Jan 1 1970 pg_controldata -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_controldata +lrwxr-xr-x 1 root wheel 83 Jan 1 1970 pg_ctl -> /nix/store/b1l8r414zsgsy78j63f0k6qb1wy0z8bf-postgresql-and-plugins-15.14/bin/pg_ctl +lrwxr-xr-x 1 root wheel 72 Jan 1 1970 pg_dump -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_dump +lrwxr-xr-x 1 root wheel 75 Jan 1 1970 pg_dumpall -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_dumpall +lrwxr-xr-x 1 root wheel 75 Jan 1 1970 pg_isready -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_isready +lrwxr-xr-x 1 root wheel 78 Jan 1 1970 pg_receivewal -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_receivewal +lrwxr-xr-x 1 root wheel 79 Jan 1 1970 pg_recvlogical -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_recvlogical +lrwxr-xr-x 1 root wheel 67 Jan 1 1970 pg_repack -> /nix/store/h2idx258zgrzfy458b71k1vl2pn78aqi-pg_repack/bin/pg_repack +lrwxr-xr-x 1 root wheel 73 Jan 1 1970 pg_repack-1.4.8 -> /nix/store/h2idx258zgrzfy458b71k1vl2pn78aqi-pg_repack/bin/pg_repack-1.4.8 +lrwxr-xr-x 1 root wheel 73 Jan 1 1970 pg_repack-1.5.0 -> /nix/store/h2idx258zgrzfy458b71k1vl2pn78aqi-pg_repack/bin/pg_repack-1.5.0 +lrwxr-xr-x 1 root wheel 73 Jan 1 1970 pg_repack-1.5.1 -> /nix/store/h2idx258zgrzfy458b71k1vl2pn78aqi-pg_repack/bin/pg_repack-1.5.1 +lrwxr-xr-x 1 root wheel 73 Jan 1 1970 pg_repack-1.5.2 -> /nix/store/h2idx258zgrzfy458b71k1vl2pn78aqi-pg_repack/bin/pg_repack-1.5.2 +lrwxr-xr-x 1 root wheel 76 Jan 1 1970 pg_resetwal -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_resetwal +lrwxr-xr-x 1 root wheel 75 Jan 1 1970 pg_restore -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_restore +lrwxr-xr-x 1 root wheel 74 Jan 1 1970 pg_rewind -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_rewind +lrwxr-xr-x 1 root wheel 78 Jan 1 1970 pg_test_fsync -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_test_fsync +lrwxr-xr-x 1 root wheel 79 Jan 1 1970 pg_test_timing -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_test_timing +lrwxr-xr-x 1 root wheel 75 Jan 1 1970 pg_upgrade -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_upgrade +lrwxr-xr-x 1 root wheel 80 Jan 1 1970 pg_verifybackup -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_verifybackup +lrwxr-xr-x 1 root wheel 75 Jan 1 1970 pg_waldump -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pg_waldump +lrwxr-xr-x 1 root wheel 72 Jan 1 1970 pgbench -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/pgbench +lrwxr-xr-x 1 root wheel 85 Jan 1 1970 postgres -> /nix/store/b1l8r414zsgsy78j63f0k6qb1wy0z8bf-postgresql-and-plugins-15.14/bin/postgres +lrwxr-xr-x 1 root wheel 75 Jan 1 1970 postmaster -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/postmaster +lrwxr-xr-x 1 root wheel 69 Jan 1 1970 psql -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/psql +lrwxr-xr-x 1 root wheel 74 Jan 1 1970 reindexdb -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/reindexdb +lrwxr-xr-x 1 root wheel 72 Jan 1 1970 switch_http_version -> /nix/store/pf0595wpsqirk8vq3ph7m3nk6823idi9-http/bin/switch_http_version +lrwxr-xr-x 1 root wheel 76 Jan 1 1970 switch_hypopg_version -> /nix/store/6qdjrmhfgdi5x99qs3m4pbwwhvv4dhs2-hypopg/bin/switch_hypopg_version +lrwxr-xr-x 1 root wheel 78 Jan 1 1970 switch_pg_cron_version -> /nix/store/jal2054cvbkxv7kg8f0acz6nsik5ix4j-pg_cron/bin/switch_pg_cron_version +lrwxr-xr-x 1 root wheel 84 Jan 1 1970 switch_pg_graphql_version -> /nix/store/nn5sccrdavpggyd933nhsfbhzirjk1py-pg_graphql/bin/switch_pg_graphql_version +lrwxr-xr-x 1 root wheel 84 Jan 1 1970 switch_pg_hashids_version -> /nix/store/3i0wlm1n9s21375f49rs2wpnbgqw9v0i-pg_hashids/bin/switch_pg_hashids_version +lrwxr-xr-x 1 root wheel 90 Jan 1 1970 switch_pg_jsonschema_version -> /nix/store/ap0vpxvrlhiy6w247kph2r3s6j6w67ff-pg_jsonschema/bin/switch_pg_jsonschema_version +lrwxr-xr-x 1 root wheel 76 Jan 1 1970 switch_pg_net_version -> /nix/store/lf4pgs972ayzlr5kbwhv0945nvyhjnm9-pg_net/bin/switch_pg_net_version +lrwxr-xr-x 1 root wheel 84 Jan 1 1970 switch_pg_partman_version -> /nix/store/wvv42m440a8kyjd109fkcnngh5qys14l-pg_partman/bin/switch_pg_partman_version +lrwxr-xr-x 1 root wheel 82 Jan 1 1970 switch_pg_repack_version -> /nix/store/h2idx258zgrzfy458b71k1vl2pn78aqi-pg_repack/bin/switch_pg_repack_version +lrwxr-xr-x 1 root wheel 94 Jan 1 1970 switch_pg_stat_monitor_version -> /nix/store/c8kaf0ngkhnmdfa4miqs32i8r75i3sfm-pg_stat_monitor/bin/switch_pg_stat_monitor_version +lrwxr-xr-x 1 root wheel 76 Jan 1 1970 switch_pg_tle_version -> /nix/store/1w7bkj8296gjr7m7wjcaidkks14f58w1-pg_tle/bin/switch_pg_tle_version +lrwxr-xr-x 1 root wheel 78 Jan 1 1970 switch_pgaudit_version -> /nix/store/s2pwg5g4avv8b8g66kwq6g9zqw9j6p5r-pgaudit/bin/switch_pgaudit_version +lrwxr-xr-x 1 root wheel 80 Jan 1 1970 switch_pgroonga_version -> /nix/store/ww0yd2n8fahbh8mxkb90752l65zb658g-pgroonga/bin/switch_pgroonga_version +lrwxr-xr-x 1 root wheel 82 Jan 1 1970 switch_pgrouting_version -> /nix/store/lq0nzykly53vlrc9vqiadjjgqdablhpg-pgrouting/bin/switch_pgrouting_version +lrwxr-xr-x 1 root wheel 80 Jan 1 1970 switch_pgsodium_version -> /nix/store/smpbz1s6vpril625mg8wqbpqxnglzxhk-pgsodium/bin/switch_pgsodium_version +lrwxr-xr-x 1 root wheel 74 Jan 1 1970 switch_pgtap_version -> /nix/store/w7j4r1jbj71444kc5c5wxswbc3br25cy-pgtap/bin/switch_pgtap_version +lrwxr-xr-x 1 root wheel 86 Jan 1 1970 switch_plan_filter_version -> /nix/store/b6svdhdmyii9zm3iqa0avkma9km9lq7q-plan_filter/bin/switch_plan_filter_version +lrwxr-xr-x 1 root wheel 90 Jan 1 1970 switch_plpgsql_check_version -> /nix/store/m5rlxi8d23fq68507warrmyiyi7vc1gn-plpgsql_check/bin/switch_plpgsql_check_version +lrwxr-xr-x 1 root wheel 78 Jan 1 1970 switch_postgis_version -> /nix/store/f0y67gz0slgq0wnscsdl571485xm4j0g-postgis/bin/switch_postgis_version +lrwxr-xr-x 1 root wheel 70 Jan 1 1970 switch_rum_version -> /nix/store/vwrmgxgvr75vrs42qck78k6xgfjvjlsb-rum/bin/switch_rum_version +lrwxr-xr-x 1 root wheel 84 Jan 1 1970 switch_safeupdate_version -> /nix/store/0i1bln9zqwman76f18l8p5j3ph103jza-safeupdate/bin/switch_safeupdate_version +lrwxr-xr-x 1 root wheel 92 Jan 1 1970 switch_supabase_vault_version -> /nix/store/bc4764di82vhi3njvaz5bzz3rwlixr6h-supabase_vault/bin/switch_supabase_vault_version +lrwxr-xr-x 1 root wheel 86 Jan 1 1970 switch_timescaledb_version -> /nix/store/qdnc37agh9cndjmwxaca5wvg02l6g7y5-timescaledb/bin/switch_timescaledb_version +lrwxr-xr-x 1 root wheel 76 Jan 1 1970 switch_vector_version -> /nix/store/c6x0xjyz16pv1gqqbarj7lma589hf9kf-vector/bin/switch_vector_version +lrwxr-xr-x 1 root wheel 80 Jan 1 1970 switch_wal2json_version -> /nix/store/vi7kj1rwa16pj7akx9k97j4x8y0na0d6-wal2json/bin/switch_wal2json_version +lrwxr-xr-x 1 root wheel 80 Jan 1 1970 switch_wrappers_version -> /nix/store/0jrx5wndh761rkvzjf4xpaka081zg9zd-wrappers/bin/switch_wrappers_version +lrwxr-xr-x 1 root wheel 73 Jan 1 1970 vacuumdb -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/vacuumdb +lrwxr-xr-x 1 root wheel 73 Jan 1 1970 vacuumlo -> /nix/store/8j8kr12mkvxy3jb9ydp6z812dqlf2y02-postgresql-15.14/bin/vacuumlo ``` As we can see, these files all point to paths under `/nix/store`. We're actually @@ -88,7 +107,7 @@ looking at a "farm" of symlinks to various paths, but collectively they form an entire installation directory we can reuse as much as we want. The path -`/nix/store/ybf48481x033649mgdzk5dyaqv9dppzx-postgresql-and-plugins-15.3` +`/nix/store/zr238w2hwryn8dgs81l2p84clmrm36vx-postgresql-and-plugins-15.14` ultimately is a cryptographically hashed, unique name for our installation of PostgreSQL with those plugins. This hash includes _everything_ used to build it, so even a single change anywhere to any extension or version would result in a @@ -97,19 +116,19 @@ _new_ hash. The ability to refer to a piece of data by its hash, by some notion of _content_, is a very powerful primitive, as we'll see later. -## Build a different version: v16 +## Build a different version: v17 -What if we wanted PostgreSQL 16 and plugins? Just replace `_15` with `_16`: +What if we wanted PostgreSQL 17 and plugins? Just replace `_15` with `_17`: ``` -nix build .#psql_16.bin +nix build .#psql_17.bin ``` You're done: ``` $ readlink result -/nix/store/p7ziflx0000s28bfb213jsghrczknkc4-postgresql-and-plugins-14.8 +/nix/store/7pqfc0mirnihmnk9dfh1kq86js8pqlxq-postgresql-and-plugins-17.6 ``` diff --git a/nix/docs/migration-tests.md b/nix/docs/migration-tests.md index 33e290af..9335f20f 100644 --- a/nix/docs/migration-tests.md +++ b/nix/docs/migration-tests.md @@ -17,7 +17,7 @@ The arguments are: The versions for upgrading can be one of two forms: -- A major version number, e.g. `14` or `15` +- A major version number, e.g. `15` or `17` - A path to `/nix/store`, which points to _any_ version of PostgreSQL, as long as it has the "expected" layout and is a postgresql install. @@ -35,7 +35,7 @@ the runbook on [running the server & client](./start-client-server.md) to refer to arbitrary git revisions. For example, if you updated an extension in this repository, and you want to -test a migration from PostgreSQL 14 to PostgreSQL 14 + (updated extension), +test a migration from PostgreSQL 15 to PostgreSQL 15 + (updated extension), using `pg_upgrade` &mdash; simply record the two git commits you want to compare, and you could do something like the following: @@ -43,8 +43,8 @@ compare, and you could do something like the following: OLD_GIT_VERSION=... NEW_GIT_VERSION=... -nix run github:supabase/nix-postgres#migration-test \ - $(nix build "github:supabase/nix-postgres/$OLD_GIT_VERSION#psql_14.bin") \ - $(nix build "github:supabase/nix-postgres/$NEW_GIT_VERSION#psql_14.bin") \ +nix run github:supabase/postgres#migration-test \ + $(nix build --print-out-paths --no-link "github:supabase/postgres/$OLD_GIT_VERSION#psql_15/bin") \ + $(nix build --print-out-paths --no-link "github:supabase/postgres/$NEW_GIT_VERSION#psql_15/bin") \ pg_upgrade ``` diff --git a/nix/docs/nix-directory-structure.md b/nix/docs/nix-directory-structure.md index c58441b4..5b7d2da3 100644 --- a/nix/docs/nix-directory-structure.md +++ b/nix/docs/nix-directory-structure.md @@ -107,6 +107,7 @@ Directory containing custom package definitions such as: - `start-replica.nix` - Replication tools - `migrate-tool.nix` - Migration utilities - `dbmate-tool.nix` - Database migration tool + - `postgres.nix` - Postgres extension registry and ourExtensions list #### `nix/checks.nix` @@ -132,7 +133,6 @@ PostgreSQL package definitions: PostgreSQL extensions: -- `default.nix` - Extension registry and ourExtensions list - Individual `.nix` files - Extension definitions like: - `pgvector.nix` - Vector similarity search - `pgsodium.nix` - Encryption extension [parent: b501e0b917b9]