Re: How to install pgfincore with PG 9.1

From: Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com>
To: Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to install pgfincore with PG 9.1
Date: 2011-11-21 02:47:12
Message-ID: CA+h6Ahju0Hd4czdkbN+dROu5irYoKhN4HjYOaSfgr364FVgbaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Nov 21, 2011 at 1:06 AM, Cédric Villemain <
cedric(dot)villemain(dot)debian(at)gmail(dot)com> wrote:

> 2011/11/20 Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com>:
> > Respected,
> > I have tried installing pgfincore with PG 9.1(one-click installer). But
> > facing below error.
> > [root(at)localhost pgfincore-v1.1]# export
> PATH=/opt/PostgreSQL/9.1/bin:$PATH
> > [root(at)localhost pgfincore-v1.1]# echo $PATH
> >
> /opt/PostgreSQL/9.1/bin:/usr/lib/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
> > [root(at)localhost pgfincore-v1.1]# which pg_config
> > /opt/PostgreSQL/9.1/bin/pg_config
> > [root(at)localhost pgfincore-v1.1]# make
> > grep: /pgfincore.control: No such file or directory
> > grep: /pgfincore.control: No such file or directory
> > grep: /pgfincore.control: No such file or directory
> > grep: /pgfincore.control: No such file or directory
> > grep: /pgfincore.control: No such file or directory
> > grep: /pgfincore.control: No such file or directory
> > grep: /pgfincore.control: No such file or directory
> > grep: /pgfincore.control: No such file or directory
> > cp pgfincore.sql pgfincore--.sql
> > gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
> > -Wdeclaration-after-statement -Wendif-labels -Wformat-security
> > -fno-strict-aliasing -fwrapv -fpic -I. -I.
> > -I/opt/PostgreSQL/9.1/include/postgresql/server
> > -I/opt/PostgreSQL/9.1/include/postgresql/internal -D_GNU_SOURCE
> > -I/usr/local/include/libxml2 -I/usr/local/include -c -o pgfincore.o
> > pgfincore.c
> > gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
> > -Wdeclaration-after-statement -Wendif-labels -Wformat-security
> > -fno-strict-aliasing -fwrapv -fpic -L/opt/PostgreSQL/9.1/lib
> > -L/usr/local/lib -L/usr/local/lib
> > -Wl,-rpath,'/opt/PostgreSQL/9.1/lib',--enable-new-dtags -shared -o
> > pgfincore.so pgfincore.o
> > rm pgfincore.o
> > [root(at)localhost pgfincore-v1.1]# make install
> > grep: /pgfincore.control: No such file or directory
> > grep: /pgfincore.control: No such file or directory
> > grep: /pgfincore.control: No such file or directory
> > grep: /pgfincore.control: No such file or directory
> > grep: /pgfincore.control: No such file or directory
> > grep: /pgfincore.control: No such file or directory
> > grep: /pgfincore.control: No such file or directory
> > grep: /pgfincore.control: No such file or directory
> > /bin/mkdir -p '/opt/PostgreSQL/9.1/share/postgresql/extension'
> > /bin/mkdir -p '/opt/PostgreSQL/9.1/lib/postgresql'
> > /bin/mkdir -p '/opt/PostgreSQL/9.1/doc/postgresql/extension'
> > grep: /pgfincore.control: No such file or directory
> > grep: /pgfincore.control: No such file or directory
> > /bin/sh
> >
> /opt/PostgreSQL/9.1/lib/postgresql/pgxs/src/makefiles/../../config/install-sh
> > -c -m 644 ./pgfincore.control
> > '/opt/PostgreSQL/9.1/share/postgresql/extension/'
> > /bin/sh
> >
> /opt/PostgreSQL/9.1/lib/postgresql/pgxs/src/makefiles/../../config/install-sh
> > -c -m 644 ./pgfincore--unpackaged--.sql ./pgfincore--.sql
> > '/opt/PostgreSQL/9.1/share/postgresql/extension/'
> >
> /opt/PostgreSQL/9.1/lib/postgresql/pgxs/src/makefiles/../../config/install-sh:
> > ./pgfincore--unpackaged--.sql does not exist.
> > make: *** [install] Error 1
> > Please assist me, thanks in advance.
>
> buggy Makefile. Thanks for the report.
> I'll fix that soon and keep you informed.
> --
>

Thank you Cédric Villemain.

grep: /pgfincore.control: No such file or directory
> cp pgfincore.sql pgfincore--.sql
>
> /opt/PostgreSQL/9.1/lib/postgresql/pgxs/src/makefiles/../../config/install-sh:
> ./pgfincore--unpackaged--.sql does not exist.
> make: *** [install] Error 1

On the above two errors, I tried one more time with small changes which
worked well.
I have copied the files displayed in error output with those which MAKE is
looking for.

[root(at)localhost pgfincore-v1.1]# cp pgfincore--unpackaged--1.1.sql
pgfincore--unpackaged--.sql
[root(at)localhost pgfincore-v1.1]# make install
/bin/mkdir -p '/opt/PostgreSQL/9.1/share/postgresql/extension'
/bin/mkdir -p '/opt/PostgreSQL/9.1/lib/postgresql'
/bin/mkdir -p '/opt/PostgreSQL/9.1/doc/postgresql/extension'
grep: /pgfincore.control: No such file or directory
grep: /pgfincore.control: No such file or directory
/bin/sh
/opt/PostgreSQL/9.1/lib/postgresql/pgxs/src/makefiles/../../config/install-sh
-c -m 644 ./pgfincore.control
'/opt/PostgreSQL/9.1/share/postgresql/extension/'
/bin/sh
/opt/PostgreSQL/9.1/lib/postgresql/pgxs/src/makefiles/../../config/install-sh
-c -m 644 ./pgfincore--unpackaged--.sql ./pgfincore--.sql
'/opt/PostgreSQL/9.1/share/postgresql/extension/'
/bin/sh
/opt/PostgreSQL/9.1/lib/postgresql/pgxs/src/makefiles/../../config/install-sh
-c -m 755 pgfincore.so '/opt/PostgreSQL/9.1/lib/postgresql/'
/bin/sh
/opt/PostgreSQL/9.1/lib/postgresql/pgxs/src/makefiles/../../config/install-sh
-c -m 644 ./README.rst '/opt/PostgreSQL/9.1/doc/postgresql/extension/'

&

-bash-4.1$ ./pgs ql -p 5433
psql.bin (9.1.1)
Type "help" for help.

postgres=# create extension pgfincore;
ERROR: could not stat file
"/opt/PostgreSQL/9.1/share/postgresql/extension/pgfincore--1.1.sql": No
such file or directory

I verified in the extension directory, there is a file pgfincore--.sql and
I copied to pfincore--1.1.sql.
-bash-4.1$ pwd
/opt/PostgreSQL/9.1/share/postgresql/extension
-bash-4.1$ cp pgfincore--.sql pgfincore--1.1.sql
-bash-4.1$ ./pgs ql -p 5433
psql.bin (9.1.1)
Type "help" for help.

postgres=# create extension pgfincore;
CREATE EXTENSION
postgres=# \dx
List of installed extensions
Name | Version | Schema | Description
-----------+---------+------------+-----------------------------------------
adminpack | 1.0 | pg_catalog | administrative functions for PostgreSQL
* pgfincore | 1.1 | public | examine and manage the os buffer cache*
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(3 rows)

postgres=# select * from pgfincore('accounts');
relpath | segment | os_page_size | rel_os_pages | pages_mem |
group_mem | os_pages_free | databit
------------------+---------+--------------+--------------+-----------+-----------+---------------+---------
base/12780/16393 | 0 | 4096 | 2 | 0 |
0 | 78195 |
(1 row)

Great tool, to help understanding PostgreSQL Caching.

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tomas Vondra 2011-11-21 02:54:25 Re: Installed. Now what?
Previous Message Ken Tanzer 2011-11-21 02:37:12 Re: Replacement for tgisconstraint? (Upgrade from 8.4 to 9.0.5)