Hello,
The table structures are different. While some tables may share the same
basic structure, the team did not clone the JPA table schema when
developing for PostgreSQL.
Because some feature was not supported by JPA (eg: JMAP)
But support with Postgres, so the JPA structure is not entirely suitable.
For example, when enabling the Row-Level Security (RLS) feature, certain
Postgres tables require an additional `domain` column.
One other example: the team is using the `hstore` column type, which is
native to PostgreSQL.
Therefore, a new database is necessary when starting with the
PostgreSQL-based application.
Regarding migration, I know the IMAP sync tool for mailbox data, but no
tool yet to migrate all data from the old JPA to the new Postgres.
Tung.
On 3/13/25 7:05 PM, Jean Helou wrote:
Hello everyone,
I am looking into switching the scaling-pulsar-smtp from the JPA stack to
the Postgresql stack.
The scaling-pulsar-smtp assembly uses a SQL database to store
- domains
- users
- recipient rewrite tables
- mail repository url store
I naively used the JPA implementation to connect to a postgresql db so I
thought migrating would be easy enough : swith the implementation and
restart the server
Unfortunately it doesn't seem as easy as that :
the JPA implementation generated tables in the configured schema with a
`james_` prefix
- domains => `james_domain`
- mail repository url store => `james_mail_repos`
- users => `james_user`
- recipient rewrite tables => `james_recipient_rewrite`
whereas the postgresql implementation expects different table names:
- domains => `domains`
- mail repository url store => `mail_repository_url`
- users => `users`
- recipient rewrite tables => `rrt`
The name of the columns within each table are different too.
the objectives for the new implementation state that it is destined to
replace the jpa build but the migrating documentation only mentions
migrating the mailbox contents not migrating all the data from data-api ...
sounds like this is not going to help adoption of the new implem :grimacing:
Do you happen to have a migration tool I missed to help with switching
implementation ?
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org