[Dspace-tech] delete old RI_ConstraintTriggers?

2008-09-10 Thread Bill Jordan

We just upgraded to DSpace 1.5.0.  When trying to add a new bitstream to an 
existing item, I get an org.postgresql.util.PSQLException:

ERROR: constraint : table bundle does not have an attribute 
mets_bitstream_id

I see that the mets_bitstream_id was removed from the bundle table as part of 
the schema changes for 1.5, but psql shows that there are still 3 
RI_ConstraintTriggers in the system catalog referring to mets_bitstream_id -- 1 
on bundle and 2 on bitstream.

Is it safe to just drop those 3 triggers (when I did that on a test copy 
of the database, I was able to add the bitstream successfully)?

--Bill


William Jordan
Associate Dean
University of Washington Libraries
Resource Acquisition and Description/
Information Technology Services Box 352900, Seattle, WA 98195-2900
Voice: (206) 685-1625   Fax: (206) 543-5457


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] delete old RI_ConstraintTriggers?

2008-09-10 Thread Sands Fish
Mark, we simply dropped these in production [EMAIL PROTECTED] when we  
encountered this issue, right?


--
sands fish
Software Engineer
MIT Libraries
Technology Research & Development
[EMAIL PROTECTED]
E25-131





On Sep 10, 2008, at 7:53 PM, Bill Jordan wrote:

>
> We just upgraded to DSpace 1.5.0.  When trying to add a new  
> bitstream to an
> existing item, I get an org.postgresql.util.PSQLException:
>
> ERROR: constraint : table bundle does not have an attribute
> mets_bitstream_id
>
> I see that the mets_bitstream_id was removed from the bundle table  
> as part of
> the schema changes for 1.5, but psql shows that there are still 3
> RI_ConstraintTriggers in the system catalog referring to  
> mets_bitstream_id -- 1
> on bundle and 2 on bitstream.
>
> Is it safe to just drop those 3 triggers (when I did that on a test  
> copy
> of the database, I was able to add the bitstream successfully)?
>
> --Bill
>
> 
> William Jordan
> Associate Dean
> University of Washington Libraries
> Resource Acquisition and Description/
> Information Technology Services Box 352900, Seattle, WA 98195-2900
> Voice: (206) 685-1625   Fax: (206) 543-5457
> 
>
> -- 
> ---
> This SF.Net email is sponsored by the Moblin Your Move Developer's  
> challenge
> Build the coolest Linux based applications with Moblin SDK & win  
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in  
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] delete old RI_ConstraintTriggers?

2008-09-10 Thread Mark Diggory
Sands, We did something a bit more through that dropping the Triggers  
(read on).  What version of Postgres are you using Bill?

What happened is that there was a transition somewhere around  
postgres 7.3 from exposing "Constrains as Triggers" to hiding such  
details from the user.  Yes, you should be able to drop these  
constraints.  But you may find other similar triggers on other tables  
if you've been maintaining a DSpace instance long enough to have been  
on postgres before version 7.3.

My ultimate solution that cleared up many of our issues was to dump  
(backup) the data separately from the database "schema". Then restore  
the database from a fresh new schema (same as the current version of  
DSpace you were previously using (but minus the INSERT statements  
that initialize certain data values).  After that I  reloaded the  
data. I documented the process here:

http://wiki.dspace.org/index.php/ 
DSpace_Release_1.5.x_Documentation_for_Older_Database_Upgrades

It was a rather challenging and dramatic process to do to the  
database, but the ultimate outcome is that any legacy weirdness  
caused by upgrading a dc cluster across may versions of postgres was  
eliminated by doing this.

This issue made me aware that its important to keep the schema and  
any data inserts in separate sql files, I think we should rework the / 
etc/directory/*.sql files to support this.

As I cooked up the solution on our systems, I would be glad to give  
you any advisement you might need to get through this issue.

-Mark

On Sep 10, 2008, at 9:23 PM, Sands Fish wrote:

> Mark, we simply dropped these in production [EMAIL PROTECTED] when we  
> encountered this issue, right?
>
>
> --
> sands fish
> Software Engineer
> MIT Libraries
> Technology Research & Development
> [EMAIL PROTECTED]
> E25-131
>
>
>
>
>
> On Sep 10, 2008, at 7:53 PM, Bill Jordan wrote:
>
>>
>> We just upgraded to DSpace 1.5.0.  When trying to add a new  
>> bitstream to an
>> existing item, I get an org.postgresql.util.PSQLException:
>>
>> ERROR: constraint : table bundle does not have an attribute
>> mets_bitstream_id
>>
>> I see that the mets_bitstream_id was removed from the bundle table  
>> as part of
>> the schema changes for 1.5, but psql shows that there are still 3
>> RI_ConstraintTriggers in the system catalog referring to  
>> mets_bitstream_id -- 1
>> on bundle and 2 on bitstream.
>>
>> Is it safe to just drop those 3 triggers (when I did that on a  
>> test copy
>> of the database, I was able to add the bitstream successfully)?
>>
>> --Bill
>>
>> 
>> William Jordan
>> Associate Dean
>> University of Washington Libraries
>> Resource Acquisition and Description/
>> Information Technology Services Box 352900, Seattle, WA 98195-2900
>> Voice: (206) 685-1625   Fax: (206) 543-5457
>> 
>>
>> - 
>> 
>> This SF.Net email is sponsored by the Moblin Your Move Developer's  
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win  
>> great prizes
>> Grand prize is a trip for two to an Open Source event anywhere in  
>> the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> ___
>> DSpace-tech mailing list
>> DSpace-tech@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] delete old RI_ConstraintTriggers?

2008-09-11 Thread Bill Jordan

On Wed, 10 Sep 2008 at 21:52, Mark Diggory wrote:

> Sands, We did something a bit more through that dropping the Triggers (read 
> on).  What version of Postgres are you using Bill?

We are still at 7.3.12

> What happened is that there was a transition somewhere around postgres 7.3 
> from exposing "Constrains as Triggers" to hiding such details from the user. 
> Yes, you should be able to drop these constraints.  But you may find other 
> similar triggers on other tables if you've been maintaining a DSpace instance 
> long enough to have been on postgres before version 7.3.

I think we've been on 7.3.x all along. Absent finding any further 
surprises, I will just drop those triggers.

> As I cooked up the solution on our systems, I would be glad to give you any 
> advisement you might need to get through this issue.

Thanks.  I may take you up on that offer.

--Bill


William Jordan
Associate Dean
University of Washington Libraries
Resource Acquisition and Description/
Information Technology Services 
Box 352900, Seattle, WA 98195-2900
Voice: (206) 685-1625   Fax: (206) 543-5457


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] delete old RI_ConstraintTriggers?

2008-09-11 Thread Mark Diggory

On Sep 11, 2008, at 7:41 AM, Bill Jordan wrote:

>
> On Wed, 10 Sep 2008 at 21:52, Mark Diggory wrote:
>
>> Sands, We did something a bit more through that dropping the  
>> Triggers (read
>> on).  What version of Postgres are you using Bill?
>
> We are still at 7.3.12
>
>> What happened is that there was a transition somewhere around  
>> postgres 7.3
>> from exposing "Constrains as Triggers" to hiding such details from  
>> the user.
>> Yes, you should be able to drop these constraints.  But you may  
>> find other
>> similar triggers on other tables if you've been maintaining a  
>> DSpace instance
>> long enough to have been on postgres before version 7.3.
>
> I think we've been on 7.3.x all along. Absent finding any further
> surprises, I will just drop those triggers.

My only concern is that the Triggers may actually necessary in 7.3.  
You should thoroughly investigate that.


>> As I cooked up the solution on our systems, I would be glad to  
>> give you any
>> advisement you might need to get through this issue.
>
> Thanks.  I may take you up on that offer.
>
> --Bill
>
> 
> William Jordan
> Associate Dean
> University of Washington Libraries
> Resource Acquisition and Description/
> Information Technology Services
> Box 352900, Seattle, WA 98195-2900
> Voice: (206) 685-1625   Fax: (206) 543-5457
> 
>
> -- 
> ---
> This SF.Net email is sponsored by the Moblin Your Move Developer's  
> challenge
> Build the coolest Linux based applications with Moblin SDK & win  
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in  
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] delete old RI_ConstraintTriggers?

2008-09-12 Thread Mark Diggory
That jogged a neuron... Yes your right, that was the first case we  
encountered in our trigger problem and I assume that it will only  
apply to that field/table on postgres 7.3.

I would advise that in the future if you decide to go on to > 7.3  
that you take the strategy I've outlined in the wiki to cleanup your  
db schema etc. But you should be ok for now if you continue on 7.3  
without those triggers.

-Mark

On Sep 12, 2008, at 12:16 PM, Bill Jordan wrote:

>
> On Thu, 11 Sep 2008 at 11:38, Mark Diggory wrote:
>
>> My only concern is that the Triggers may actually necessary in 7.3.
>> You should thoroughly investigate that.
>
> After some testing, I'm convinced these triggers are only there to  
> keep the mets_bitstream_id in sync with the bitstream table.   
> Without the mets_bitstream_id, there is nothing for these triggers  
> to do.  And in fact if I modify the pre-1.5 database_schema.sql by  
> removing the mets_bitstream_id column, the triggers are never created.
>
> --Bill
>
> 
> William Jordan
> Associate Dean
> University of Washington Libraries
> Resource Acquisition and Description/
> Information Technology Services Box 352900, Seattle, WA 98195-2900
> Voice: (206) 685-1625   Fax: (206) 543-5457
> 


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] delete old RI_ConstraintTriggers?

2008-09-12 Thread Bill Jordan

On Thu, 11 Sep 2008 at 11:38, Mark Diggory wrote:

> My only concern is that the Triggers may actually necessary in 7.3.
> You should thoroughly investigate that.

After some testing, I'm convinced these triggers are only there to keep 
the mets_bitstream_id in sync with the bitstream table.  Without the 
mets_bitstream_id, there is nothing for these triggers to do.  And in fact 
if I modify the pre-1.5 database_schema.sql by removing the 
mets_bitstream_id column, the triggers are never created.

--Bill


William Jordan
Associate Dean
University of Washington Libraries
Resource Acquisition and Description/
Information Technology Services 
Box 352900, Seattle, WA 98195-2900
Voice: (206) 685-1625   Fax: (206) 543-5457


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech