Обсуждение: PLpgSQL Stat Problem

Поиск
Список
Период
Сортировка

PLpgSQL Stat Problem

От
Andy Lewis
Дата:
I got the following error after trying to copy the example at:

http://www.postgresql.org/mhonarc/pgsql-sql/1999-04/msg00076.html

----------------------------------------------------------
test=> select a(pin,first_name) from ibs_subscriber ;
ERROR:  stat failed on file ${exec_prefix}/lib/plpgsql.so
----------------------------------------------------------

The file plpgsql.so does exist in /usr/local/pgsql/lib.

Any ideas?

Andy




Re: [GENERAL] PLpgSQL Stat Problem

От
Oleg Broytmann
Дата:
On Wed, 28 Apr 1999, Andy Lewis wrote:
> I got the following error after trying to copy the example at:
> http://www.postgresql.org/mhonarc/pgsql-sql/1999-04/msg00076.html
>
> ----------------------------------------------------------
> test=> select a(pin,first_name) from ibs_subscriber ;
> ERROR:  stat failed on file ${exec_prefix}/lib/plpgsql.so
> ----------------------------------------------------------
>
> The file plpgsql.so does exist in /usr/local/pgsql/lib.
> Any ideas?

   What are permissions on the file plpgsql.so? Does postgres allowed
access to the file? Check it:
   su - postgres
   cat plpgsql.so > /dev/null

> Andy

Oleg.
----
    Oleg Broytmann     http://members.xoom.com/phd2/     phd2@earthling.net
           Programmers don't die, they just GOSUB without RETURN.


Re: [GENERAL] PLpgSQL Stat Problem

От
Andy Lewis
Дата:
On Wed, 28 Apr 1999, Oleg Broytmann wrote:

> On Wed, 28 Apr 1999, Andy Lewis wrote:
> > I got the following error after trying to copy the example at:
> > http://www.postgresql.org/mhonarc/pgsql-sql/1999-04/msg00076.html
> >
> > ----------------------------------------------------------
> > test=> select a(pin,first_name) from ibs_subscriber ;
> > ERROR:  stat failed on file ${exec_prefix}/lib/plpgsql.so
> > ----------------------------------------------------------
> >
> > The file plpgsql.so does exist in /usr/local/pgsql/lib.
> > Any ideas?
>
>    What are permissions on the file plpgsql.so? Does postgres allowed
> access to the file? Check it:
>    su - postgres
>    cat plpgsql.so > /dev/null
>

The permissions were chown'ed to root.root

I've changed them to postgres.postgres.

It still gave me the same error. Do I need to stop the postmaster and
restart it?

All of the other files in /usr/local/pgsql/lib are owned by root.root.

Should they be owned by postgres.postgres?

Thanks

Andy


Re: [GENERAL] PLpgSQL Stat Problem

От
jim@reptiles.org (Jim Mercer)
Дата:
> It still gave me the same error. Do I need to stop the postmaster and
> restart it?
>
> All of the other files in /usr/local/pgsql/lib are owned by root.root.
>
> Should they be owned by postgres.postgres?

the entire build process should be done as postgres.
the install process should be done as postgres.
postmaster should be started as postgres.

--
[ Jim Mercer    Reptilian Research      jim@reptiles.org   +1 416 410-5633 ]
[ The telephone, for those of you who  have forgotten, was a commonly used ]
[ communications technology in the days before electronic mail.            ]
[ They're still easy to find in most large cities. -- Nathaniel Borenstein ]

Re: [GENERAL] PLpgSQL Stat Problem

От
Oleg Broytmann
Дата:
On Wed, 28 Apr 1999, Jim Mercer wrote:
> the entire build process should be done as postgres.
> the install process should be done as postgres.
> postmaster should be started as postgres.

   It depends on your habits, actually.

   Usually, I build sources as phd, install as root.
   But of course postmaster should be started as postgres.

> --
> [ Jim Mercer    Reptilian Research      jim@reptiles.org   +1 416 410-5633 ]
> [ The telephone, for those of you who  have forgotten, was a commonly used ]
> [ communications technology in the days before electronic mail.            ]
> [ They're still easy to find in most large cities. -- Nathaniel Borenstein ]

Oleg.
----
    Oleg Broytmann     http://members.xoom.com/phd2/     phd2@earthling.net
           Programmers don't die, they just GOSUB without RETURN.


Re: [GENERAL] PLpgSQL Stat Problem

От
Andy Lewis
Дата:
I built as root and installed as root and run
postmaster as postgres and didn't have any problems up until now.

Seems like I'd run across others. Are we saying this is indeed the
problem?

Do I need to reinstall?

Andy

On Wed, 28 Apr 1999, Jim Mercer wrote:

> > It still gave me the same error. Do I need to stop the postmaster and
> > restart it?
> >
> > All of the other files in /usr/local/pgsql/lib are owned by root.root.
> >
> > Should they be owned by postgres.postgres?
>
> the entire build process should be done as postgres.
> the install process should be done as postgres.
> postmaster should be started as postgres.
>
> --
> [ Jim Mercer    Reptilian Research      jim@reptiles.org   +1 416 410-5633 ]
> [ The telephone, for those of you who  have forgotten, was a commonly used ]
> [ communications technology in the days before electronic mail.            ]
> [ They're still easy to find in most large cities. -- Nathaniel Borenstein ]
>


Re: [GENERAL] PLpgSQL Stat Problem

От
jim@reptiles.org (Jim Mercer)
Дата:
> I built as root and installed as root and run
> postmaster as postgres and didn't have any problems up until now.
>
> Seems like I'd run across others. Are we saying this is indeed the
> problem?
>
> Do I need to reinstall?

some systems have a umask of 077 for root, which would mean that
no other user can read the files.

also, the DATADIR needs to be owned by whoever (postgres) is running
postmaster.

if your system is working, then you've probably adjusted things accordingly.

--
[ Jim Mercer    Reptilian Research      jim@reptiles.org   +1 416 410-5633 ]
[ The telephone, for those of you who  have forgotten, was a commonly used ]
[ communications technology in the days before electronic mail.            ]
[ They're still easy to find in most large cities. -- Nathaniel Borenstein ]

Re: [GENERAL] PLpgSQL Stat Problem

От
Andy Lewis
Дата:
Postgres is allowed to access that file. No error message on the:

    cat plpgsql.so > /dev/null

Andy

On Wed, 28 Apr 1999, Oleg Broytmann wrote:

> On Wed, 28 Apr 1999, Andy Lewis wrote:
> > I got the following error after trying to copy the example at:
> > http://www.postgresql.org/mhonarc/pgsql-sql/1999-04/msg00076.html
> >
> > ----------------------------------------------------------
> > test=> select a(pin,first_name) from ibs_subscriber ;
> > ERROR:  stat failed on file ${exec_prefix}/lib/plpgsql.so
> > ----------------------------------------------------------
> >
> > The file plpgsql.so does exist in /usr/local/pgsql/lib.
> > Any ideas?
>
>    What are permissions on the file plpgsql.so? Does postgres allowed
> access to the file? Check it:
>    su - postgres
>    cat plpgsql.so > /dev/null
>
> > Andy
>
> Oleg.
> ----
>     Oleg Broytmann     http://members.xoom.com/phd2/     phd2@earthling.net
>            Programmers don't die, they just GOSUB without RETURN.
>