[horde] problem with postgres 7.2

horde at manjusri.org horde at manjusri.org
Fri Apr 19 04:45:34 PDT 2002


I just got bit by the same thing that Marcus Schopen saw.

The problem table appears to be the active_sessions table.

If I uncomment the Debug statement round about line 50 of
/etc/horde/db_pgsql.inc, the output from trying to load the IMP
page where I hit this horde error says this:

[START OF OUTPUT]

Debug: query = SELECT val FROM active_sessions WHERE sid = '5fb471d8a06f2f6634bb8585b7a2eae2' AND name = 'HordeSession'

Debug: query = update active_sessions set val='base64:JHRoaXMtPmluID0gJyc7ICR0aGlzLT5wdCA9IGFycmF5KCk7IA==', changed='20020419035430.93708400' where sid='5fb471d8a06f2f6634bb8585b7a2eae2' and name='HordeSession'

Warning: PostgreSQL query failed: ERROR: value too long for type character varying(14) in /etc/horde/db_pgsql.inc on line 52

Warning: Supplied argument is not a valid PostgreSQL result resource in /etc/horde/db_pgsql.inc on line 122

Debug: query = insert into active_sessions ( sid, name, val, changed ) values ('5fb471d8a06f2f6634bb8585b7a2eae2', 'HordeSession', 'base64:JHRoaXMtPmluID0gJyc7ICR0aGlzLT5wdCA9IGFycmF5KCk7IA==', '20020419035430.93708400')

Warning: PostgreSQL query failed: ERROR: value too long for type character varying(14) in /etc/horde/db_pgsql.inc on line 52

[ END OF OUTPUT ]

And the active_sessions table in the horde database says this:

horde-> \d active_sessions;
           Table "active_sessions"
 Column  |         Type          | Modifiers 
---------+-----------------------+-----------
 sid     | character varying(32) | not null
 name    | character varying(32) | not null
 val     | text                  | 
 changed | character varying(14) | not null
Indexes: changed_idx
Unique keys: pk_active_sessions

horde->

So I got slightly ambitious and went into my postgres instance as the postgres
user and ended up with something like this as a sequence of changes to
restore my Debian Woody IMP on Horde -> Postgres instance.  This is off the
cuff and probably lacks some important detail, but it worked for me:

horde=# create table new_sessions
horde-# (sid character varying(32) not null,
horde(# name character varying(32) not null,
horde(# val text,
horde(# changed character varying(32) not null)
horde-# ;
CREATE

horde=# insert into new_sessions
horde-# (sid, name, val, changed)
horde-# select sid, name, val, changed
horde-# from active_sessions;
INSERT 0 30

horde=# drop table active_sessions;
DROP
horde=# alter table new_sessions
horde-# rename to active_sessions;
ALTER

horde=# alter table active_sessions
horde-# owner to hordemgr;
ALTER

--Shannon.


More information about the horde mailing list