How to solve PostgreSQL pgAdmin error "Server instrumentation not installed" for adminpack?

22,312

Solution 1

For current versions of PostgreSQL and pgAdmin, the "Guru" dialog warning has a "Fix it!" button or command. Use it.

If there's no "Fix it!" then we can use the Unix command line as follows.

This is for PostgreSQL 9.1. Older versions do it differently.

PostgresSQL docs are here:

Install adminpack like this:

$ sudo apt-get install postgresql-contrib

To verify we got the files, list them:

$ dpkg -L postgresql-contrib-9.1 | grep adminpack

Result:

/usr/share/postgresql/9.1/extension/adminpack.control
/usr/share/postgresql/9.1/extension/adminpack--1.0.sql
/usr/lib/postgresql/9.1/lib/adminpack.so

Alternate way to find the adminpack files:

$ sudo updatedb
$ locate adminpack

Use psql to create the extension:

$ sudo -u postgres -i
$ psql [dbname]
# CREATE EXTENSION adminpack;

(If you don't have super-user or if you need to create a per-db extension, see the comments below by @w00t to use \c dbname to connect to the database)

To verify:

# select * from pg_extension;

Result:

extname  | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition 
-----------+----------+--------------+----------------+------------+-----------+--------------
plpgsql   |       10 |           11 | f              | 1.0        |           | 
adminpack |       10 |           11 | f              | 1.0        |           | 

To load the extension into pgAdmin, see the database server icon:

  • Right-click the icon then choose "Disconnent"
  • Right-click the icon then choose "Connent"

To verify adminpack is working:

  • Click a database icon
  • On the top-right pane, click the "Statistics" tab.
  • Scroll to the bottom of the Statistics.
  • You now see a "Size" entry that shows the database size on disk.

Solution 2

The "Fix It!" button would appear in the "Guru Hint" dialog next to OK and Cancel. If you are not offered the button, enter the following in a console:

sudo apt-get install postgresql-contrib

then click the guru button (in my version, a face to the left of the ? button) and the "Fix It!" button should appear. Click it.

See the answer from joelparkerhenderson if the Fix It! button doesn't appear.

Share:
22,312
joelparkerhenderson
Author by

joelparkerhenderson

Joel Parker Henderson: software consultant for Agile, Ruby, SQL, NoSQL, iOS, Android, and LAMP stack. JoelParkerHenderson.com SixArm.com Software Solutions GitHub/joelparkerhenderson Facebook/joelparkerhenderson NumCommand.com

Updated on November 18, 2020

Comments

  • joelparkerhenderson
    joelparkerhenderson over 3 years

    PostgreSQL 9.1 pgAdmin III on Ubuntu is giving this warning:

    Guru Hint - Server instrumentation not installed

    Server Instrumentation

    The server lacks instrumentation functions.

    pgAdmin II uses some support functions that are not available by default in all PostgreSQL versions...

    The adminpack is installed and actived by default if ...

    Once your extension is installed, you only need to click on the "Fix it!" button ...

    How to solve this?

  • w00t
    w00t almost 10 years
    After doing the manual instructions (my db user doesn't have superuser access) it shows the size but pgadmin3 still complains. <shrug>
  • w00t
    w00t almost 10 years
    Found it: I first had to \c dbname to connect to the database, apparently the extension is per-db.
  • w00t
    w00t almost 10 years
    No sorry, I'm not awesome enough yet apparently ;-)
  • squeegee
    squeegee about 9 years
    Worked in PC-BSD's TrueOS as well, using pkg.
  • poshest
    poshest about 8 years
    locate adminpack gives me /usr/share/postgresql/9.5/extension/adminpack.control, and I have postgres 9.3 installed, so CREATE EXTENSION adminpack; gives me could not open extension control file "/usr/share/postgresql/9.3/extension/adminpack.control": No such file or directory. I'd love some advice.
  • poshest
    poshest about 8 years
    To answer my own dilemma. I installed this sudo apt-get install postgresql-contrib-9.3 and now it works. Previously I'd installed sudo apt-get install postgresql-contrib (no version specified)
  • poshest
    poshest about 8 years
    Specifying the version to be in line with my version of Postgresql was crucial for me. Eg sudo apt-get install postgresql-contrib-9.3, not sudo apt-get install postgresql-contrib
  • user323094
    user323094 about 7 years
    Tiny fix - it should be "sudo -u postgres -i" and "psql [dbname]".