#1
  1. Me likey breadsticks...
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2003
    Location
    Los Angeles
    Posts
    1,189
    Rep Power
    18

    Which configure option specifies where procedural language .so files go?


    Upgraded from 7.1.3 to 7.4 on my development box from source and noticed plpgsql wasn't being installed, and my functions weren't preserved when restoring from a pg_dumpall. Tracked this down to plpgsql.so not being in where postgres thought it was supposed to be.

    I used the same exact configure options as the original 7.1.3 install

    --enable-locale --with-CXX --prefix=/usr --with-perl --enable-multibyte --with-tcl --with-odbc --enable-syslog --with-python --with-openssl --with-krb5=/usr/kerberos --sysconfdir=/etc/pgsql --mandir=/usr/share/man --docdir=/usr/share/doc --includedir=/usr/include/pgsql --datadir=/usr/share/pgsql

    and my plpgsql.so file ended up in /usr/lib/postgresql , however the pg_dumpall thought it should be located in /usr/lib/pgsql/ . So I fixed this by making a symlink in /usr/lib/pgsql/plpgsql.so to /usr/lib/postgresql/plpgsql.so and now everything works. But I was just wondering if the default path suffix was changed from pgsql to postgresql (in the configure options I didn't specify a libdir), if the person who setup 7.1.3 before me just did something against defaults not reflected in pg_config --configure, or if it's possibly something else that could lead to other problems later on. I checked the 7.4 docs, but it doesn't explicitly specify the default libdir (it's supposed to be based off of prefix), however most of the other examples look like they point to default dirs called pgsql, which makes me wonder why the .so files ended up in /usr/lib/postgresql.
    Thanks,
    -b
    PostgreSQL, it's what's for dinner...
  2. #2
  3. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    62
    Are you sure that /usr/lib/postgresql/plpgsql.so wasn't left over from the older install? You might have it backward. I think $PREFIX/postgresql was the old way and $PREFIX/pgsql is the new way (since 7.2). Also, did you check for /usr/lib/plpgsql.so? You might want to run 'updatedb' and then 'locate plpgsql.so' to check where there might be other copies.
    The real n-tier system:

    FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL

    Amazon wishlist -- rycamor (at) gmail.com
  4. #3
  5. Me likey breadsticks...
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2003
    Location
    Los Angeles
    Posts
    1,189
    Rep Power
    18
    I'm pretty sure that the /usr/lib/postgresql is new. All the file dates are from when I installed. Also, I believe the only previous install was from 7.1.3 RPMs (as the company I'm at migrated from mysql just a couple years ago from RPMs). I used the exact configure options returned from pg_config and did an updatedb and locate for plpgsql. The only place it comes up is /usr/lib/postgresql/ .

    I can go back and try different options as this is my development box which is a VMWare partition that I have backed up right before the installation, but I was just wondering if anyone had any ideas before I had to go that route.

    **EDIT**
    It's confirmed, there was no /usr/lib/postgresql/ directory before. I had to revert to the old VM snapshot because it appears that the are literal carriage returns in the data which psql -f doesn't like. Any easy workarounds for this, I'm currently trying to do a pg_dumpall -c --insert in the hopes that it fixes it.

    **EDIT II**
    Added --libdir=/usr/lib/pgsql to configure and it fixed it, not sure if this is a new change to defaults or something specific to my system. Gonna start a new thread about my importing as that's a different topic altogether.

    Thanks,
    -b
    Last edited by bcyde; November 20th, 2003 at 12:57 PM.
    PostgreSQL, it's what's for dinner...

IMN logo majestic logo threadwatch logo seochat tools logo