tembo-io / trunk

Package manager and registry for Postgres extensions
PostgreSQL License
257 stars 17 forks source link

Use apt.postgresql.org.sh to install Postgres #602

Closed theory closed 9 months ago

theory commented 9 months ago

Borrowed from the pgxn-tools Dockerfile, developed under the guidance of Postgres apt maintainer Christoph Berg. Importantly, purge postgresql-client-common before installing the pgdb Postgres, since it conflicts with the pgdb package. This also allows the PATH configuration to be removed, as the /usr/bin Postgres commands are owned by pgdb.

theory commented 9 months ago

Oh yay, a new error:

Executing in container: "test -e ./postgis-3.4.0/configure"
Executing in container: "su postgres -c bash -c \"././postgis-3.4.0/configure && make -C ./postgis-3.4.0 check && echo done\""
configure: error: source directory already configured; run "make distclean" there first

Makes sense since the Dockerfile runs ./configure && make. Should it not?

theory commented 9 months ago

Oh yay, a new error:

Fixed in #606; moved the postgis changes after the fix, in #607.

theory commented 9 months ago

Looks good. I assume no version locking necessary on that script

No idea. I've used it for a few years. You can look at the source though. I think it lets you run multiple versions at once; they all live in version-specific directories.

theory commented 9 months ago

I think it lets you run multiple versions at once

That said, the Dockerfile removes the script, so it can't be used to install another version without downloading it again.