Re: Core Extensions relocation - Mailing list pgsql-hackers

From Greg Smith
Subject Re: Core Extensions relocation
Date
Msg-id 4DF0EBE5.4030905@2ndquadrant.com
Whole thread Raw
In response to Re: Core Extensions relocation  (Vinicius Abrahao <vinnix.bsd@gmail.com>)
List pgsql-hackers
Vinicius Abrahao wrote:
> This is my first post at Hackers, so sorry if I am been a noob here, 
> but I am pretty confused about
> how to create the extension pg_buffercache.

This list is for talking about development of new features, normally on 
the latest development version of the software (right now 9.1).  There 
is no such thing as CREATE EXTENSION in versions before that.  A 
question like "how do I install pg_buffercache for 9.0?" should normally 
get sent to one of the other mailing lists; any of pgsql-performance, 
pgsql-admin, or pgsql-general would be appropriate to ask that at.  This 
one really isn't.  It's also better to avoid taking someone else's 
discussion and replying to it with your questions.

> But even so, I need to ask, because my production is on another versions:
> What is the right way to install this contrib at 9.0.1, 9.0.2 and 9.0.4 ?

But since I happen to know this answer, here's an example from a RedHat 
derived Linux system running PostgreSQL 9.0.4, logged in as the postgres 
user:

-bash-3.2$ locate pg_buffercache.sql
/usr/pgsql-9.0/share/contrib/pg_buffercache.sql
/usr/pgsql-9.0/share/contrib/uninstall_pg_buffercache.sql
-bash-3.2$ psql -d pgbench -f 
/usr/pgsql-9.0/share/contrib/pg_buffercache.sql
SET
CREATE FUNCTION
CREATE VIEW
REVOKE
REVOKE
-bash-3.2$ psql -d pgbench -c "select count(*) from pg_buffercache"count
------- 4096

The location of the file will be different on other platforms, but 
that's the basic idea of how you install it.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us




pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: SLRU limits
Next
From: Greg Smith
Date:
Subject: Re: tuning autovacuum