[ome-users] Problem with big images
Josh Moore
josh at glencoesoftware.com
Fri Jun 15 10:22:24 BST 2012
On Jun 15, 2012, at 10:26 AM, harri.jaalinoja at helsinki.fi wrote:
> Hi Josh,
>
>>
>> can you also show me the definition of the configuration table:
>>
>> omero=# \d configuration
>> Table "public.configuration"
>> Column | Type | Modifiers
>> --------+------------------------+-----------
>> name | character varying(255) | not null
>> value | text |
>> Indexes:
>> "configuration_pkey" PRIMARY KEY, btree (name)
>>
>
>
> [omero at lmu-omero2 ~]$ psql -h localhost -U omero omero
> Password for user omero:
> psql (9.1.4)
> Type "help" for help.
>
> omero=> \d configuration
> Table "public.configuration"
> Column | Type | Modifiers
> --------+------------------------+-----------
> name | character varying(255) | not null
> value | text |
>
> omero=>
>
>
>
>> In my DB, "name" is a unique primary key, but you have two values that are identical. In fact, if I try to load in your values to my DB I get this:
>>
>> psql:/tmp/config.sql:5: ERROR: duplicate key value violates unique constraint "configuration_pkey"
>> DETAIL: Key (name)=(pixelDataEventLogLoader.v1.current_id) already exists.
>>
>
> It seems somehow the primary key constraint is missing from my db, if it is supposed to show up as an index like in your example. How it could have gone missing I have no idea.
>
> This is from the SQL script that originally was used to create the database:
> [omero at lmu-omero2 OMERO.server-Beta-4.3.3]$ grep -i configuration OMERO4.3__0.sql
> ...
> create table configuration ( name varchar(255) primary key, value text );
> ...
>
> So to fix this in place, it might be enough to first remove the offending entry (with value -1) from the 'configuration' table, and then add the primary key constraint?
I would think so:
delete from configuration where name = 'pixelDataEventLogLoader.v1.current_id' and value = '-1';
alter table configuration add primary key (name);
If you have ever receive a clue how it disappeared, please let us know. If you think there may be further damage to your DB, it might be good to dump the data (no schema), re-create, and re-load the data.
> Cheers,
> Harri
Cheers,
~Josh
More information about the ome-users
mailing list