Ensure extension exists

Started by Geoffrey Hoffmanabout 8 years ago3 messagesgeneral
Jump to latest
#1Geoffrey Hoffman
geoffrey.hoffman@gmail.com

I want to use the pgcrypto extension with a particular database. Does it exist permanently and survive a server reboot? Or if not, how do you ensure it runs when the server restarts?

I ask because in my Docker development environment I have to run it every time I restart the container, and just want to be prepared for production in AWS Aurora.

Thanks,
Geoff

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Geoffrey Hoffman (#1)
Re: Ensure extension exists

On 2/1/18 19:47, Geoffrey Hoffman wrote:

I want to use the pgcrypto extension with a particular database. Does it exist permanently and survive a server reboot? Or if not, how do you ensure it runs when the server restarts?

Once an extension is installed, it stays installed, just like any other
permanent database object such as tables and functions.

I ask because in my Docker development environment I have to run it every time I restart the container, and just want to be prepared for production in AWS Aurora.

Maybe you have your development environment set up in a way that it
blows away your database on each run.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#3geoff hoffman
geoff@rxmg.com
In reply to: Peter Eisentraut (#2)
Re: Ensure extension exists

On Feb 2, 2018, at 12:38 PM, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:

On 2/1/18 19:47, Geoffrey Hoffman wrote:

I want to use the pgcrypto extension with a particular database. Does it exist permanently and survive a server reboot? Or if not, how do you ensure it runs when the server restarts?

Once an extension is installed, it stays installed, just like any other
permanent database object such as tables and functions.

I ask because in my Docker development environment I have to run it every time I restart the container, and just want to be prepared for production in AWS Aurora.

Maybe you have your development environment set up in a way that it
blows away your database on each run.

Yep, ok thanks for confirming!