postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

Recommended procedure for adding extensions

Open james-callahan opened this issue 5 years ago • 6 comments

We occasionally get GH issues raised about (a) about providing instructions to add extensions themselves and (b) adding new extensions to our PG image.

Our current (Q4 2023) policy is that

(a) we do not have instructions for developers; we do have instructions for customers.

(b) we do not usually respond to requests by adding new extensions — but we might add new extensions in the future.

This ticket is meant to be a parent/clearinghouse for public requested extension. If/when there is an outpouring of interest in one of these extensions, we may want to scheduled the work.

james-callahan avatar Nov 03 '20 03:11 james-callahan

I'm also interested in installing stuff, but in my case I'd add FDWs.

Another way to go about this would to provide the pgsql-13 folder as yet another PVC that is copied the first time from the image to the destination (as in the PVC being empty triggers the copy).

Not sure what the consequences would be besides having to add fsGroup to the SecurityContext of the Kubernetes' pod in case Pod Security Policy is enabled.

Another wilder idea would add a CLI command to install extensions. That one would be amazing, if at all possible.

davi5e avatar Nov 12 '20 14:11 davi5e

I'm not sure about the current situation, So is there a way to add extensions to the cluster?

RazgrizHsu avatar Dec 09 '20 18:12 RazgrizHsu

If you have still problem, just create another Dockerfile which extends default crunchy-postgres-gis container. In my case I downloaded oracle_fdw extension locally and it looks like this:

FROM registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-14.4-3.2-0

COPY oracle_fdw-ORACLE_FDW_2_4_0 /usr/pgsql-14/share/extension/

Then build image and use it in your kustomize / helm chart.

sieczak-a avatar Aug 11 '22 11:08 sieczak-a

It's not necessarily as simple as that - the crunchy image doesn't ship any development headers so you can't build extensions.

jelmer avatar Aug 11 '22 19:08 jelmer

just do it yourself :) pull crunchy-containers suite via github and extend the dockerfiles.

Best regards

Schmaetz avatar Aug 15 '22 12:08 Schmaetz