On Mon, Nov 21, 2011 at 1:06 AM, Cédric Villemain <cedric.villemain.debian@xxxxxxxxx> wrote:
2011/11/20 Raghavendra <raghavendra.rao@xxxxxxxxxxxxxxxx>:
buggy Makefile. Thanks for the report.> Respected,
> I have tried installing pgfincore with PG 9.1(one-click installer). But
> facing below error.
> [root@localhost pgfincore-v1.1]# export PATH=/opt/PostgreSQL/9.1/bin:$PATH
> [root@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@localhost pgfincore-v1.1]# which pg_config
> /opt/PostgreSQL/9.1/bin/pg_config
> [root@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@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.
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@localhost pgfincore-v1.1]# cp pgfincore--unpackaged--1.1.sql pgfincore--unpackaged--.sql
[root@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