You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Kiril Stankov <ki...@open-net.biz> on 2015/09/01 12:47:38 UTC

What happens to attachments when new revision of a doc is written

Hi,

I wonder if attachments are copied (if not modified) when a new revision 
of a doc is saved.
E.g. if I have ten revisions of a doc, all with the same attachment, is 
it stored once or ten times?
Thanks!
------------------------------------------------------------------------
*With best regards,*
Kiril Stankov,


Re: What happens to attachments when new revision of a doc is written

Posted by Kiril Stankov <ki...@open-net.biz>.
Great! Thanks, Alex!
------------------------------------------------------------------------
*With best regards,*
Kiril Stankov,

On 01-Sep-15 1:52 PM, Alexander Shorin wrote:
> No, the don't get copied on every document update. You may notice
> revpos field in attachment stubs - that's the revision number where
> attachment stored. It only changes when attachment gets actually
> updated.
> --
> ,,,^..^,,,
>
>
> On Tue, Sep 1, 2015 at 1:47 PM, Kiril Stankov <ki...@open-net.biz> wrote:
>> Hi,
>>
>> I wonder if attachments are copied (if not modified) when a new revision of
>> a doc is saved.
>> E.g. if I have ten revisions of a doc, all with the same attachment, is it
>> stored once or ten times?
>> Thanks!
>> ------------------------------------------------------------------------
>> *With best regards,*
>> Kiril Stankov,
>>


Re: What happens to attachments when new revision of a doc is written

Posted by Alexander Shorin <kx...@gmail.com>.
No, the don't get copied on every document update. You may notice
revpos field in attachment stubs - that's the revision number where
attachment stored. It only changes when attachment gets actually
updated.
--
,,,^..^,,,


On Tue, Sep 1, 2015 at 1:47 PM, Kiril Stankov <ki...@open-net.biz> wrote:
> Hi,
>
> I wonder if attachments are copied (if not modified) when a new revision of
> a doc is saved.
> E.g. if I have ten revisions of a doc, all with the same attachment, is it
> stored once or ten times?
> Thanks!
> ------------------------------------------------------------------------
> *With best regards,*
> Kiril Stankov,
>