The document demonstrates the installation and usage of the pg_profile PostgreSQL extension. It shows commands to extract, install and enable the extension. Samples are taken on multiple servers and queries run to view the samples, baselines and reports generated. Issues connecting to one server are also demonstrated along with resolving the connection.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
90 views4 pages
PG Profile Extension
The document demonstrates the installation and usage of the pg_profile PostgreSQL extension. It shows commands to extract, install and enable the extension. Samples are taken on multiple servers and queries run to view the samples, baselines and reports generated. Issues connecting to one server are also demonstrated along with resolving the connection.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4
pg_profile:
[root@SCDvLBTC28 ~]# cd /usr/edb/as12/share/extension/
[root@SCDvLBTC28 extension]# ls -ltr *gz -rw-r--r-- 1 root root 186808 Jun 1 14:06 pg_profile--0.3.6.tar.gz [root@SCDvLBTC28 extension]# tar xzf pg_profile--0.3.6.tar.gz --directory /usr/edb/as12/share/extension/ [root@SCDvLBTC28 extension]# ls -ltr total 3928 -rw-r--r-- 1 root root 2259 Nov 24 2019 pldbgapi--unpackaged--1.1.sql
postgres=# CREATE EXTENSION pg_profile;
CREATE EXTENSION postgres=# \dx List of installed extensions Name | Version | Schema | Description --------------------+---------+------------ +---------------------------------------------------------------- dblink | 1.2 | public | connect to other PostgreSQL databases from within a database pg_profile | 0.3.6 | public | PostgreSQL load profile repository and report builder pg_stat_statements | 1.7 | public | track execution statistics of all SQL statements executed (14 rows)
postgres=# select * from show_servers();
server_name | connstr | enabled | description -------------+---------------------------+---------+------------- local | dbname=postgres port=5444 | t | (1 row)
server | result | elapsed --------- +----------------------------------------------------------------------------- +------------- local | OK | 00:00:00.47 plmtest | could not establish connection +| 00:00:00.03 | SQL statement "SELECT dblink_connect('server_connection',server_connstr)" +| | PL/pgSQL function take_sample(integer,boolean) line 138 at PERFORM +| | PL/pgSQL function take_sample_subset(integer,integer) line 27 at assignment+| | SQL function "take_sample" statement 1 +| | fe_sendauth: no password supplied | (2 rows)
postgres=# select * from take_sample();
server | result | elapsed ---------+--------+------------- plmtest | OK | 00:00:00.63 local | OK | 00:00:00.51 (2 rows)