How do I install pgcrypto?

Post date: Nov 20, 2013 7:48:22 PM

1. You will need to request the pgcrypto package from Greenplum Support. Greenplum Support does not support the pgcrypto package downloaded from the postgresql site.

To install pgcrypto on your Greenplum Database cluster follow these instructions:

1.Unzip and untar the pgcrypto package. Two directories are provided in the tar file, lib and share.

2.Copy the lib/postgresl/ file to $GPHOME/lib/postgresql directory on the Master.

3.Ensure that the owner of the file is the gpadmin user:

chown gpadmin:gpadmin

4.You will also need to copy the file to all segment servers. To do this run the following command as the gpadmin user:

gpscp -f seg_hostfile $GPHOME/lib/postgresql/ =:/$GPHOME/lib/postgresql/

5.Set the variable search_path in the pgcrypto.sql file.

6.On the Master you will then need to run the script share/postgresql/contrib/pgcrypto.sql for the database you want to use pgcrypto on. To do this run

the following command:

psql -d DBNAME -ff /Path_to_file/postgresql/contrib/pgcrypto.sql

Once this script is finished you can log in to the database and test pgcrypto.

Latest version of the pgcrypto download contains an executable 

[gpadmin@sachi ~]$ ./ 

<hosts file> not specified.

./ -f <hosts file>

[gpadmin@sachi ~]$