Forum OpenACS Development: Re: File Storage Saving file in the database

Posted by Gustaf Neumann on
I applied the change but I get the same result as my 5.9 install:

I am not surprised, the code for lobs has not changed for at least 10 years (aside of being moved around).

DETAIL: Key (lob)=(4) is not present in table "lobs".

It says that the lob_id 4 is not in lobs.... Check this with "select * from lobs". Can it be that this is a broken entry from previous attempts?
Why are you trying to use LOBs on fresh PostgreSQL installations?

Posted by Raul Rodriguez on
The same lob error shows up on my 5.9 install where the xml query was not missing. I will look more into what is going on.

I am comparing Oracle and PostgreSQL file storage installs.

If lobs are not used in fresh PostgreSQL installations, what was it replaced with?

Thank you

Posted by Gustaf Neumann on
The same lob error shows up on my 5.9 install where the xml query was not missing
As said before, I am not surprised, since it is in essence the lob code of 5.10 is the same code as in 5.9 (and earlier versions). But my point was: since the update operation fails, was the "set_content" operation performed before this? Maybe, item is already broken due to earlier attempts, then one has to look at different places. So, it can make a difference if the content item exists before the operation or not.... Therefore, my question, what lobs are in your database. Do you have a lob with id=4 in your database? Do you have any lobs already in the database? If yes, then "set_content" works sometimes.... The select query of above should answer some of this.

what was it replaced with?
In essence, files can be stored in the content repository either as "file" or "lob". The OpenACS application decides, how to store it. For example, the file-storage has a parameter "StoreFilesInDatabaseP", which is per default "0", so files are stored by default with the storage_type "file", which means: in the file system.