Skip to content

Instantly share code, notes, and snippets.

@wayneeseguin
Created December 20, 2011 22:25
Show Gist options
  • Save wayneeseguin/1503575 to your computer and use it in GitHub Desktop.
Save wayneeseguin/1503575 to your computer and use it in GitHub Desktop.
SM Framework PostgreSQL Extension Set

Install PostgreSQL Extension Set

[root@sl2 ~]# sm set install postgresql
  [✔] postgresql head                         

Replication

Setup

postgres@replica$ postgresql replication configure master 10.0.5.211 replica 10.0.5.212

Status

[postgres@sl1 ~]$ sm postgresql replication status master 10.0.5.211  replica 10.0.5.212
master-10.0.5.211: 
0/C0237D8
replica-10.0.5.212:
0/C0237D8

[postgres@sl1 ~]$ sm postgresql replication master status master 10.0.5.211  replica 10.0.5.212
0/C0237D8

[postgres@sl1 ~]$ sm postgresql replication replica status master 10.0.5.211  replica 10.0.5.212
0/C0237D8

Extensions

Installation

[root@sl1 ~]# sm postgresql extensions install tsearch2 hstore
make: Nothing to be done for `all'.
/bin/mkdir -p '/opt/sm/pkg/versions/postgresql/9.1.2/data/extension'
/bin/mkdir -p '/opt/sm/pkg/versions/postgresql/9.1.2/lib'
/bin/sh ../../config/install-sh -c -m 644 ./tsearch2.control '/opt/sm/pkg/versions/postgresql/9.1.2/data/extension/'
/bin/sh ../../config/install-sh -c -m 644 ./tsearch2--1.0.sql ./tsearch2--unpackaged--1.0.sql  '/opt/sm/pkg/versions/postgresql/9.1.2/data/extension/'
/bin/sh ../../config/install-sh -c -m 755  tsearch2.so '/opt/sm/pkg/versions/postgresql/9.1.2/lib/'
NOTICE:  extension "tsearch2" already exists, skipping
CREATE EXTENSION
make: Nothing to be done for `all'.
/bin/mkdir -p '/opt/sm/pkg/versions/postgresql/9.1.2/lib'
/bin/mkdir -p '/opt/sm/pkg/versions/postgresql/9.1.2/data/extension'
/bin/sh ../../config/install-sh -c -m 755  hstore.so '/opt/sm/pkg/versions/postgresql/9.1.2/lib/hstore.so'
/bin/sh ../../config/install-sh -c -m 644 ./hstore.control '/opt/sm/pkg/versions/postgresql/9.1.2/data/extension/'
/bin/sh ../../config/install-sh -c -m 644 ./hstore--1.0.sql ./hstore--unpackaged--1.0.sql  '/opt/sm/pkg/versions/postgresql/9.1.2/data/extension/'
NOTICE:  extension "hstore" already exists, skipping
CREATE EXTENSION

Enabling

[root@sl1 ~]# sm postgresql extensions enabled
plpgsql
tsearch2
hstore
pg_buffercache
adminpack

Listing

[root@sl1 ~]# sm postgresql extensions available
adminpack auth_delay auto_explain btree_gin btree_gist chkpass citext cube dblink dict_int dict_xsyn dummy_seclabel earthdistance file_fdw fuzzystrmatch hstore intagg intarray isn lo ltree oid2name pageinspect passwordcheck pg_archivecleanup pgbench pg_buffercache pgcrypto pg_freespacemap pgrowlocks pg_standby pg_stat_statements pgstattuple pg_test_fsync pg_trgm pg_upgrade pg_upgrade_support seg sepgsql spi sslinfo start-scripts tablefunc test_parser tsearch2 unaccent uuid-ossp vacuumlo xml2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment