3

I'm trying to create extension under postgresql 9.1 (Linux):

CREATE EXTENSION pg_trgm;

but got error:

ERROR:  could not open extension control file "/usr/share/pgsql/extension/pg_trgm.control": No such file or directory

This file exists and has r/w permissions for all users:

[root@postgresql extension]# pwd
/usr/share/pgsql/extension
[root@postgresql extension]# ls -l | grep pg_trgm
-rwxrwxrwx 1 root root  4977 Apr  6  2013 pg_trgm--1.0.sql
-rwxrwxrwx 1 root root  4230 Apr  6  2013 pg_trgm--unpackaged--1.0.sql
-rwxrwxrwx 1 root root   177 Apr  6  2013 pg_trgm.control

How to solve this problem?

  • When you copy pg_trgm--1.0.sql to pg_trgm.sql, does the error go away? – dezso Mar 19 '14 at 8:54
  • @dezso I've tried it - same result. – Andremoniy Mar 19 '14 at 9:01
  • If you su as postgres, do you still see the files? – dezso Mar 19 '14 at 9:16
  • @dezso sorry? I don't understand – Andremoniy Mar 19 '14 at 9:43
  • 1
    @ErwinBrandstetter yes, I'm sure. As it was clarified later, it is known bug of ALT linux: bugzilla.altlinux.org/show_bug.cgi?id=27878 – Andremoniy Mar 19 '14 at 13:29
1

In this particular situation what did help me:

It was needed just to copy extension directory from /usr/share/pgsql/extension/ to /var/lib/pgsql-root/usr/lib/pgsql/extension/.

That's all folks.

  • No config changes involved? – dezso Mar 19 '14 at 12:18
  • @dezso there aren't any config changes – Andremoniy Mar 19 '14 at 12:36
  • BTW, I have not got yet needed reputation for creation new tags, but this question relates to specific linux version - ALT Linux. It seems, that this solution relates only to it. – Andremoniy Mar 19 '14 at 12:40
  • That makes very little sense. Is the PostgreSQL server perhaps running within a chroot? – Craig Ringer Mar 20 '14 at 1:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.