Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?

share|improve this question
    
When you copy pg_trgm--1.0.sql to pg_trgm.sql, does the error go away? –  dezso Mar 19 at 8:54
    
@dezso I've tried it - same result. –  Andremoniy Mar 19 at 9:01
    
If you su as postgres, do you still see the files? –  dezso Mar 19 at 9:16
    
@dezso sorry? I don't understand –  Andremoniy Mar 19 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 at 13:29

1 Answer 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.

share|improve this answer
    
No config changes involved? –  dezso Mar 19 at 12:18
    
@dezso there aren't any config changes –  Andremoniy Mar 19 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 at 12:40
    
That makes very little sense. Is the PostgreSQL server perhaps running within a chroot? –  Craig Ringer Mar 20 at 1:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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