-
Notifications
You must be signed in to change notification settings - Fork 82
Best practice for adding PostgreSQL extensions? #108
Comments
@michiels Can you take a look? |
ping @michiels |
@conradwt Thanks for the question. I'm not too familiar with Postgres extensions. Some questions to figure out what might be wrong: Did you install the Ubuntu package with the extension before doing the migration with If these two things are not the case, it might be that we are not correctly adding permissions to the deploy role and that we need to fix that in the chef recipes. Could you try and verify this? |
@michiels Yes, the extension can only be installed on the server-side. Furthermore, extensions need to be installed as superuser or database owner. Thus, as part of the Chef run, I need to create the extension. So, are there general steps for setting up extensions using Chef? |
@conradwt Are the extensions installable via Please let me know if this solves your issue :) |
@jvanbaarsen Yes, the package will need to be installed using apt-get. The the database-owner, deployer, will need to create the extension on the database just like any table. I'll give this a try and get back to you. |
@conradwt Ok! Let me know if it works, if so fell free to open a PR to add this to the documentation! |
Hi, I was wondering, what's the best practice for adding PostgreSQL extensions? I ask this question because I can easily add the Ubuntu package (i.e. postgresql-contib) to the runlist to properly get the package installed using Chef. However, it seems that I need to create this extension as root instead of the deploy user. BTW, I tried to install the UUID extension using a Rails migration during a Capistrano run with the following code:
The above generated the following error messages with the PostgreSQL logs:
Shouldn't the deploy role be able to alter the application database? Or is an extension being installed at the PostgreSQL server level?
The text was updated successfully, but these errors were encountered: