[ 
https://issues.apache.org/jira/browse/JAMES-4150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18031136#comment-18031136
 ] 

Benoit Tellier commented on JAMES-4150:
---------------------------------------

+1 for making attachment sotrage optionnal

(might be needed for JMAP or other use cases)

PR on this topic is welcomed.

> Make Attachment Storage Optional for PostgreSQL Message Store
> -------------------------------------------------------------
>
>                 Key: JAMES-4150
>                 URL: https://issues.apache.org/jira/browse/JAMES-4150
>             Project: James Server
>          Issue Type: Improvement
>          Components: Blob, jpa
>    Affects Versions: 3.9.0
>            Reporter: omerfarukicen
>            Priority: Critical
>             Fix For: 3.9.0
>
>         Attachments: Dispatch
>
>
> [https://github.com/apache/james-project/tree/postgresql]
> Apache James Distributed  -> Postgresql branch 
> Related Epic: JAMES-3226 (Postgres message store)
> When a Dispatch(ek-1) message contains multiple parts, all parts are 
> currently stored in ObjectStorage and also persisted in the {{attachment}} 
> table.
> However, since we are using JMAP, these parts are already represented as 
> “virtual parts,” making the extra ObjectStorage write redundant.
> In the JPA project, this behavior is configurable and can be disabled.
> But in the PostgreSQL project, it is currently mandatory.
> To align the PostgreSQL behavior with JPA and to avoid unnecessary storage 
> operations, we should make attachment storage {*}optional{*}.
> Introduce a configuration option (e.g., {{{}attachmentStorageEnabled{}}}) to 
> enable or disable attachment persistence for PostgreSQL.
> When disabled, attachments should not be stored in ObjectStorage or the 
> {{attachment}} table.
> {{if (mapperFactory.isAttachmentStorageEnabled()) {
>     return new MessageStorer.WithAttachment...}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to