Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-3496

Update PMM framework to support PostgreSQL Plugin Installation

    XMLWordPrintable

    Details

    • Type: Admin & Maintenance Task
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: QA
    • Labels:

      Description

      Based on the following comment, for the issue, https://jira.percona.com/browse/PMM-3436 
      ```
      [root@ip-10-178-2-67 postgresql-10.6]# yum install -y gcc readline-devel zlib-devel
      [ec2-user@ip-10-178-2-67 ~]$ wget https://ftp.postgresql.org/pub/source/v10.6/postgresql-10.6.tar.gz
      [ec2-user@ip-10-178-2-67 ~]$ tar -xf postgresql-10.6.tar.gz
      [ec2-user@ip-10-178-2-67 ~]$ cd postgresql-10.6
      [ec2-user@ip-10-178-2-67 postgresql-10.6]$ ./configure
      [ec2-user@ip-10-178-2-67 postgresql-10.6]$ make
      [ec2-user@ip-10-178-2-67 postgresql-10.6]$ sudo make install
      [root@ip-10-178-2-67 postgresql-10.6]# cd contrib/
      [root@ip-10-178-2-67 contrib]# make
      [root@ip-10-178-2-67 contrib]# make install
      [root@ip-10-178-2-67 contrib]# adduser postgres
      [root@ip-10-178-2-67 contrib]# mkdir /usr/local/pgsql/data
      [root@ip-10-178-2-67 contrib]# chown postgres /usr/local/pgsql/data
      [root@ip-10-178-2-67 contrib]# su - postgres
      [postgres@ip-10-178-2-67 ~]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
      [postgres@ip-10-178-2-67 ~]$ exit
      [root@ip-10-178-2-67 ~]# vim /usr/local/pgsql/data/postgresql.conf
      [root@ip-10-178-2-67 ~]# grep -A3 shared_preload_libraries /usr/local/pgsql/data/postgresql.conf
      #shared_preload_libraries = '' # (change requires restart)
      shared_preload_libraries = 'pg_stat_statements'

      pg_stat_statements.max = 10000
      pg_stat_statements.track = all
      [root@ip-10-178-2-67 contrib]# su - postgres
      [postgres@ip-10-178-2-67 ~]$ /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
      [postgres@ip-10-178-2-67 ~]$ /usr/local/pgsql/bin/psql
      postgres=# CREATE EXTENSION pg_stat_statements;
      CREATE EXTENSION
      postgres=# SELECT * FROM pg_available_extensions WHERE name = 'pg_stat_statements';
      name | default_version | installed_version | comment
      -------------------+--------------------------------------------------------------------------------------------
      pg_stat_statements | 1.6 | 1.6 | track execution statistics of all SQL statements executed
      (1 row)
      ```

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            puneet.kala Puneet Kala
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 3 days, 3 hours
                3d 3h

                  Smart Checklist