Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add postgis installation #35

Closed
wants to merge 1 commit into from
Closed

Add postgis installation #35

wants to merge 1 commit into from

Conversation

gma2th
Copy link

@gma2th gma2th commented Oct 5, 2019

This is a draft of what could be the installation of extensions with pgenv. Tested with PostgreSQL 12.0 and Postgis 3.0.0beta1

Exemple:

$ pgenv use 12.0
$ pgenv extensions build postgis-3.0.0beta1
$ psql -c "create extension postgis"

Limitation:
Only postgis supported
No format of available extensions
No cleaning

#33

@theory
Copy link
Owner

theory commented Oct 5, 2019

I wonder if we should add a directory for shell scripts that install specific extensions or something. Might be able to generalize a lot of them by installing from PGXN (API docs and client). PostGIS isn't on PGXN, but a lot of other extensions are.

@fluca1978
Copy link
Collaborator

I think we could add some sort of "post-install" configuration variable with the path of a program to run. And more in general we could add "hook scripts" to run before and after every build/install step.

@fluca1978
Copy link
Collaborator

I don't like the proposed implementation too much.
I think we should rely on external scripts, e.g., pgxnclient.
Since I'm looking at a (very simple) implementation of running psql with the right version, making an external shell script that relies on pgenv psql should make it even simpler ( see #38 ).
I don't think we need some as complex as patching, but since it is already there the whole directory/versioning structure, we could work on that and place a script in the same tree to be run once use is launched for the first time (i.e., initdb runs), or when make ends.

fluca1978 added a commit to fluca1978/pgenv that referenced this pull request Oct 17, 2019
The idea is to able to run a script as soon as:
- build finishes
- initdb finishes
- start finishes

So the user can control when and how to, for instance, install extensions.
See Pull Request theory#35 and issue theory#33.
fluca1978 added a commit that referenced this pull request Oct 18, 2019
The idea is to able to run a script as soon as:
- build finishes
- initdb finishes
- start finishes

So the user can control when and how to, for instance, install extensions.
See Pull Request #35 and issue #33.
@fluca1978
Copy link
Collaborator

@gma2th can you try installing postgis as a POSTINITDB script out of the current
b40b942 ? If that results general enough we could also include it as an example to activate on demand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants