gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] bootstrapping database problem


From: Florian Hubold
Subject: Re: [Gnumed-devel] bootstrapping database problem
Date: Wed, 16 Jul 2008 12:37:28 +0200
User-agent: Thunderbird 2.0.0.14 (X11/20080629)

Karsten Hilbert schrieb:
That is entirely possible. PostgreSQL is quite powerful in
how it can be set up and thus a bit complex and certainly
site-dependant.
I only overtook the gnumed-server package from Paul Grinberg, and adapted
it to mandriva. Again, those problem should then be in all gnumed-server
packages, as they are build upon the spec of Paul Grinbergs package, AFAIK.
I was thankful that he did the setup of postgresql, but as it seems
it does not work right or he intented this setup to be used in another way.
Can't figure this out, i'll ask him if it works for him and what his intentions were.
   "could not access file "$libdir/plpgsql": No such file or directory"
Sounds like the plpgsql package for PostgreSQL isn't
properly installed.
It was not installed at all. But even when it would have been, the path is another:

   $ rpm -ql postgresql8.3-plpgsql
   /usr/lib/pgsql/plpgsql.so

Maybe this is no problem, as you said there are two alternative methods
of trying to access plpgsql.

pg_ident.conf:

# MAPNAME     IDENT-USERNAME    PG-USERNAME
gm-dbo-alikes gmadm gm-dbo

This line should not be needed unless you are using a system user gmadm.
Ok, this one will be removed, then.
postgres-alikes postgres postgres
postgres-alikes gmadm postgres

Same here, that last line is only needed if you have a
system user gmadm which you want to use to handle the
bootstrapping.

In fact, the whole pg_ident.conf business is only needed
when you want to bootstrap as a user different from either
root or postgres.
So the whole pg_ident.conf setup can be commented out.

postgresql.conf
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
No settings needed unless you want to enable remote machines
to connect. In that case set listen_address.
Will keep this in mind.
local template1 postgres ident postgres-alikes
local gnumed_v7 postgres ident postgres-alikes
local gnumed_v8 postgres ident postgres-alikes
local all postgres ident sameuser
local template1 gm-dbo ident gm-dbo-alikes
local samegroup +gm-logins md5

Uh, like, those need to be in pg_hba.conf ?!?

And then only this line

local samegroup +gm-logins md5

is really needed. Except if you want to bootstrap under an
account other than root/postgres, then you'd need this too:
So i will remove anything else than that line from postgresql.conf.
local template1 postgres ident postgres-alikes
local gnumed_vX postgres ident postgres-alikes
local all postgres ident sameuser

I have somewhat reoarganized

        http://wiki.gnumed.de/bin/view/ConfigurePostgreSQL

so perhaps that's a bit clearer now.

$ sudo urpmi gnumed-server
Um die Abh??ngigkeiten zu erf??llen, werden die folgenden Pakete installiert
   Package                        Version      Release       Arch
(medium "local")
  gnumed-server                  v8           6mud2008.1    i586
(medium "main_release")
  postgresql8.3                  8.3.1        2mdv2008.1    i586
  postgresql8.3-plpython         8.3.1        2mdv2008.1    i586
  postgresql8.3-server           8.3.1        2mdv2008.1    i586

This really looks like it's missing postgresql8.3-plpgsql
(unless that's included in the basic server anyway).
No it was missing all the time. Has been added now.
In the bootstrap log I noticed this:

Stopping postgresql service: [FEHLER]
What is this about ?

Oh, maybe PG didn't run yet.
Exactly. "service x restart" is the only way to handle a running and
a not-running service with the same command. If it's not running,
this will display and error, which is correct.
2008-07-15 12:28:50  [DATA]   (/usr/lib/gnumed-server/Gnumed/pycommon/gmPsql.py:address@hidden):  
../sql/gmCreateProceduralLanguages.sql:42: could not access file "plpgsql": No such file 
or directoryCONTEXT:  SQL function "make_plpgsql" statement 1
The second method we try fails, too.
Hope this is enough to make plpgsql work, see above the problem with the different path on mandriva.
You need to include the postgresql-plpgsql.rpm in the
dependencies. We'll then have to make sure it installs the
language into the template1 database (very likely it does).

Karsten

Will do all the changes, and report back after testing.
And sorry for the mails getting longer and longer. ;-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]