Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install profiler gives an error #15

Closed
slavadba opened this issue Dec 17, 2022 · 6 comments
Closed

install profiler gives an error #15

slavadba opened this issue Dec 17, 2022 · 6 comments

Comments

@slavadba
Copy link

Hi,

postgres@student:~/plprofiler$ pwd
/var/lib/postgresql/plprofiler
postgres@student:~/plprofiler$
postgres@student:~/plprofiler$ sudo USE_PGXS=1 make install
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/mit-krb5  -c -o plprofiler.o plprofiler.c
plprofiler.c:20:10: fatal error: postgres.h: No such file or directory
   20 | #include "postgres.h"
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: plprofiler.o] Error 1
postgres@student:~/plprofiler$

If install from contrib directory I got another error:

postgres@student:/usr/share/postgresql/12/contrib/plprofiler$ make install
Makefile:27: /contrib/contrib-global.mk: No such file or directory
make: *** No rule to make target '/contrib/contrib-global.mk'.  Stop.
postgres@student:/usr/share/postgresql/12/contrib/plprofiler$

I cant find contrib-global.mk - so maybe its wrong contrib??
but in any case, this does not explain the error in the first case when the installation does not come from the contrib.

Postgres version :

postgres=# select version();
                                                             version                                                              
----------------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 12.5 (Ubuntu 12.5-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
(1 row)

postgres=#
@wieck
Copy link
Collaborator

wieck commented Dec 18, 2022 via email

@wieck
Copy link
Collaborator

wieck commented Dec 18, 2022 via email

@slavadba
Copy link
Author

Installation from binary packages solve all problems.
Thank you for help!

@slavadba
Copy link
Author

one more question is off topic , but in order not to create a new issue, I 'll ask here if you don 't mind:

postgres=# SELECT pl_profiler_enable(true);
ERROR:  function pl_profiler_enable(boolean) does not exist
LINE 1: SELECT pl_profiler_enable(true);
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
postgres=#
postgres=# select * from pg_extension ;
  oid  |      extname       | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition 
-------+--------------------+----------+--------------+----------------+------------+-----------+--------------
 13449 | plpgsql            |       10 |           11 | f              | 1.0        |           | 
 24617 | plpgsql_check      |       10 |         2200 | f              | 1.14       |           | 
 32812 | pg_stat_statements |       10 |         2200 | t              | 1.7        |           | 
 32820 | plprofiler         |       10 |         2200 | t              | 4.2        |           | 
(4 rows)

postgres=# select count(*) from pg_proc where proname='pl_profiler_enable';
 count 
-------
     0
(1 row)

postgres=
```#

@wieck
Copy link
Collaborator

wieck commented Dec 19, 2022 via email

@slavadba
Copy link
Author

there is no mention in the examples https://github.com/bigsql/plprofiler/blob/master/doc/examples.md about pl_profiler_set_enabled_local - it says about pl_profiler_enable, therefore, it probably needs to be corrected.
Thanks again for your help!

@luss luss closed this as completed Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants