RT 2.1.48, Postgresql database initialization

Hello All,

Running the initializing script for 2.1.48, using a Postgres background,
dies with the following during database initialization:

–snip-- …
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
’customfields_pkey’ for table ‘customfields’
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
’customfieldvalues_pkey’ for table ‘customfieldvalues’
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
’sessions_pkey’ for table 'sessions’
schema sucessfully inserted
Now inserting database ACLs
DBD::Pg::db selectrow_array failed: execute on disconnected handle at
/opt/rt3/etc/acl.Pg line 48, line 565.
DBD::Pg::st execute failed: execute on disconnected handle at
//opt/rt3/sbin/initdb line 224, line 565.
Problem with statement:
create user rt3 with password ‘rt_pass’ NOCREATEDB NOCREATEUSER;
execute on disconnected handle at //opt/rt3/sbin/initdb line 225,
line 565.

It looks to me like the ACL insertion fails because the DB connection has
already been closed or something?

Has anyone else seen this? If not, I’ll try and have a look at it tomorrow
(or maybe Monday) to work out what’s going on.

Cheers,

  • Andrew

I wrote:

It looks to me like the ACL insertion fails because the DB connection has
already been closed or something?

Has anyone else seen this? If not, I’ll try and have a look at it tomorrow
(or maybe Monday) to work out what’s going on.

Ugh. Next time I’ll have a look at the script before posting. The script
calls the following three functions, in order:

     insert_schema()
     insert_acl()
     insert_data()

All three close the database connection, but the database connection
doesn’t appear to be re-opened in-between the calls. This means that
insert_acl() fails because insert_schema() closed the handle it planned to
use. I think.

  • Andrew

Indeed. This had already been fixed in my dev sources. I’m kind of
surprised that this didn’t break mysql too.

-j

»|« http://www.bestpractical.com/rt – Trouble Ticketing. Free.