How to Install Apache AGE Extension? #40285
Replies: 2 comments 1 reply
-
|
Bump |
Beta Was this translation helpful? Give feedback.
-
|
Supabase doesn’t officially support Apache AGE yet, and adding it isn’t straightforward because the Postgres images are built with Nix, tightly sandboxed, and don’t allow compiling extensions at runtime. That’s why extending What does work todayThe only reliable method is: 1. Fork the Supabase Postgres repo 2. Add AGE as a Nix package nativeBuildInputs = [
flex
bison
postgresql
];AGE’s build scripts require both. 3. Add your age.nix to ./build.sh v15This ensures AGE is compiled against the exact Postgres toolchain used by Supabase. Why Dockerfile extension failsSupabase Postgres is not a “normal” Postgres install. Even if you compile AGE inside the container:
So Quick recommendationIf you need AGE today, the practical solution is:
Those are the only two stable approaches right now. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm at my wit's end. I need Apache AGE with Supabase. Nothing I tried works.
Approach 1: Extend supabase/postgres Image
I have this Dockerfile:
I added
ageto theshared_preload_librariesin a custompostgresql.conf:Postgres fails on boot, complaining about not finding the
age.so. I checked. They're there next to their kins of other exstensions .so files.Attempt 2: Build 'Em Like You Do
Y'all build the images with Nix, so adding an extension should be straightforward. Right? I'll preface this by saying I never used Nix before, but I'm familiar with its concept. Plus, you have a guide.
I added this
age.nixfile tonix/ext, and addedagetonix/packages/postgres.nix.Building the docker image (command:
docker build --no-cache -f Dockerfile-15 -t supabase-postgres:15 .) fails with this:But....
flexis already there! I havenativeBuildInputs = [ flex ];in theage.nixfile just likepg_tle.nixdoes.What's the best way to add Apache AGE to Supabase?
Beta Was this translation helpful? Give feedback.
All reactions