Thread: Installing Contrib Modules with a Precompiled Binary

Installing Contrib Modules with a Precompiled Binary

From
Aram Fingal
Date:
I'm using the OS X precompiled binary from EnterpriseDB and want to add the tablefunc contrib module.  I haven't been
ableto find any documentation about how to do this or even whether modules can be added to this binary version.   

I suppose that it may be a good idea to export my databases and compile from source anyway.  I see that Postgres is
runningas a 32-bit application while I have a 64-bit machine and OS (OS X, Snow Leopard.)   

-Aram

Re: Installing Contrib Modules with a Precompiled Binary

From
Tom Lane
Date:
Aram Fingal <fingal@multifactorial.com> writes:
> I'm using the OS X precompiled binary from EnterpriseDB and want to add the tablefunc contrib module.  I haven't been
ableto find any documentation about how to do this or even whether modules can be added to this binary version.   

Most packagers distribute all the contrib modules as a single lump ---
look around, you'll likely find it available from EDB.

> I suppose that it may be a good idea to export my databases and compile from source anyway.  I see that Postgres is
runningas a 32-bit application while I have a 64-bit machine and OS (OS X, Snow Leopard.)   

Note that you will need a dump and reload to convert a database from
32-bit to 64-bit.  If you don't know that you are running into memory
restrictions, it may not be worth the trouble.

            regards, tom lane

Re: Installing Contrib Modules with a Precompiled Binary

From
Dave Page
Date:
On Mon, Sep 20, 2010 at 7:06 PM, Aram Fingal <fingal@multifactorial.com> wrote:
> I'm using the OS X precompiled binary from EnterpriseDB and want to add the tablefunc contrib module.  I haven't been
ableto find any documentation about how to do this or even whether modules can be added to this binary version. 

It's the same as the source version except you don't need to build the
binary - just run the SQL script from the share/ subdirectory of the
installation.

> I suppose that it may be a good idea to export my databases and compile from source anyway.  I see that Postgres is
runningas a 32-bit application while I have a 64-bit machine and OS (OS X, Snow Leopard.) 

The 9.0 release supports 32 and 64 bit Intel machines.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgres Company

Re: Installing Contrib Modules with a Precompiled Binary

From
Aram Fingal
Date:

On Sep 20, 2010, at 2:12 PM, Dave Page wrote:

On Mon, Sep 20, 2010 at 7:06 PM, Aram Fingal <fingal@multifactorial.com> wrote:
I'm using the OS X precompiled binary from EnterpriseDB and want to add the tablefunc contrib module.  I haven't been able to find any documentation about how to do this or even whether modules can be added to this binary version.

It's the same as the source version except you don't need to build the
binary - just run the SQL script from the share/ subdirectory of the
installation.

So that means something like:

psql -d dbname -f /Library/PostgreSQL/8.4/share/postgresql/contrib/tablefunc.sql



I suppose that it may be a good idea to export my databases and compile from source anyway.  I see that Postgres is running as a 32-bit application while I have a 64-bit machine and OS (OS X, Snow Leopard.)

The 9.0 release supports 32 and 64 bit Intel machines.

I suppose that I will have to export and re-import the databases when I upgrade?  That may be worth it but I'll do it later.  I do have some some very intensive queries, which take a long time to run, but I gather (from Tom Lane's comment) that switching to 64-bit will only help if the query would benefit from utilizing large amounts of RAM (like more than 2GB?)  A single query will still run on a single processor core.  I do have 8GB RAM in the machine but my databases are just not that big.  

-Aram

Re: Installing Contrib Modules with a Precompiled Binary

From
Dave Page
Date:
On Mon, Sep 20, 2010 at 8:20 PM, Aram Fingal <fingal@multifactorial.com> wrote:
>
> So that means something like:
> psql -d dbname -f
> /Library/PostgreSQL/8.4/share/postgresql/contrib/tablefunc.sql

Yup.

> I suppose that I will have to export and re-import the databases when I
> upgrade?

Hmm, yes - interesting point. pg_upgrade won't work, because OSX will
automatically run the 64bit part of the Universal binaries with 9.0,
where the 8.3 or 8.4 versions would have been 32bit.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgres Company