maas-devel team mailing list archive
-
maas-devel team
-
Mailing list archive
-
Message #00595
Re: File-storage replication; was MAAS testing: maas - 0.1+bzr1002+dfsg-0+1018+87~ppa0~quantal1
On Mon, Sep 24, 2012 at 10:05 AM, Jeroen Vermeulen <jtv@xxxxxxxxxxxxx> wrote:
> On 2012-09-22 17:15, Gavin Panella wrote:
>>
>> On 21 September 2012 06:30, Jeroen Vermeulen <jtv@xxxxxxxxxxxxx> wrote:
>>>
>>> Django gets in the way. I forget the details but basically, we found no
>>> quick way to make use of bytea fields in django. Right now we base64
>>> into
>>> text fields. :(
>>
>>
>> Are we? As far as I can tell we're using Django's FileSystemStorage
>> (see maasserver.models.filestorage) to save files to disk, not into
>> the database; we store only the filename in the database. For small
>> files I think base64 into text fields in the database will be fine for
>> now, and a step up from using local disk directly.
>
>
> We do both, in different places. But when it comes to storing binary data
> in the database itself, as you were describing, we base64 into text fields
> because we couldn't get bytea to work.
Do you recall the problem with bytea btw? The SSO systems needed to
set 'bytea_output=escape' in postgresql.conf (or in the session, or
with ALTER DATABASE) to get bytea fields working with Django.
--
Stuart Bishop <stuart.bishop@xxxxxxxxxxxxx>
Follow ups
References