[rt-users] rt3.0.7_01 rt_setup_database fails w/postgres

McKinlay, Ken ken.mckinlay at dy4.com
Wed Nov 26 21:31:49 EST 2003


Abraham,

I had the exact same problem earlier today. Jody Belka provided this
workaround:

"I installed RT on my system just the other day and also had this problem.
It seems that the file used for initialising a Postgres database 
(schema.Pg) is actually designed to run through psql, not through 
rt-setup-database. To get it up and running i had to let it create the 
database, run the Pg script through psql, and then modify 
rt-setup-database to skip these two stages (by commenting out the 
appropriate lines). "

The steps I took to get the database up were:
1. make initialize database

2. edit the script it ran ($RT_HOME/sbin/rt-setup-database) and comment out
the create_database and create_schema calls (I think those are the names of
the functions)

3. run "make initialize" a second time to finish the process.

4. undo the changes I made to $RT_HOME/sbin/rt-setup-database

Hope this helps

Ken McKinlay
Dy 4 Systems





-----Original Message-----
From: Abraham Ingersoll
To: rt-devel at lists.fsck.com
Cc: rt-users at lists.fsck.com
Sent: 11/26/03 6:36 PM
Subject: [rt-users] rt3.0.7_01 rt_setup_database fails w/postgres


sbin/rt-setup-database from 3.0.7_01 dies when I try to initialize a
postgresql database. From what I can tell, it's choking on the
transaction "BEGIN" at the top of Pg.schema, but I didn't dig into
rt-setup-database enough to be sure.

rt-setup-database output (args{debug} on):

[root at gimli rt-3-0-7_01]# make initialize-database
/usr/bin/perl //home/abe/apache_perl/rt/sbin/rt-setup-database --action
init --dba root --prompt-for-dba-password --debug
In order to create a new database and grant RT access to that database,
this script needs to connect to your Pg instance on localhost as root.
Please specify that user's database password below. If the user has no
database
password, just press return.
 
Password: Now creating a database for RT.
Creating Pg database rt3.
Now populating database schema.
Creating database schema.
SQL:
 
 
 
 
BEGIN
Died at //home/abe/apache_perl/rt/sbin/rt-setup-database line 161.
make: *** [initialize-database] Error 2


Importing the schema into postgres by hand seems to work:

[root at gimli etc]# psql template1 -U root -W < schema.Pg
Password:
BEGIN
CREATE SEQUENCE
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
'attachments_pkey
' for table 'attachments'
CREATE TABLE
CREATE INDEX
CREATE INDEX
[snip snip snip]
CREATE INDEX
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
'sessions_pkey' f
or table 'sessions'
CREATE TABLE
COMMIT

My platform/environment:
	Redhat 9
	Postgresql 7.3.4 (postgresql-server-7.3.4-3.rhl9)
	perl-DBI version 1.38, DBD::Pg version 1.31



--Abe

_______________________________________________
rt-users mailing list
rt-users at lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm



More information about the rt-users mailing list