You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Raffaele Gambelli <R....@westpole.it> on 2021/02/24 10:33:37 UTC

Migrating from Oracle to PostgreSQL

Hi all,

I'm on Jackrabbit 2.14.0, I have an Oracle based installation having a big DEFAULT_BUNDLE table, it is 61787 megabytes:

PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.OraclePersistenceManager

with a file Datastore:

DataStore class="org.apache.jackrabbit.core.data.FileDataStore

I know there is at least one "breaking change", the following one where NODE_ID in PostgreSQL is splitted in two columns:

PostgreSQL
create table ${schemaObjectPrefix}BUNDLE (NODE_ID_HI bigint not null, NODE_ID_LO bigint not null, BUNDLE_DATA bytea not null, PRIMARY KEY (NODE_ID_HI, NODE_ID_LO))

Oracle
create table ${schemaObjectPrefix}BUNDLE (NODE_ID raw(16) not null, BUNDLE_DATA blob not null) ${tablespace}

Do you know about any other changes, which could make more difficoult the data migration?

I don't understand if org.apache.jackrabbit.core.RepositoryCopier is a solution in my scenario or if it would be too much slow and so if a different solution would be recommended, but I don't know which...

Thanks for your support, best regards
[https://westpole.it/firma/logo.png]

Raffaele Gambelli
WebRainbow(r) Software Developer

P +390518550576
M 3371641888
E R.Gambelli@westpole.it
W https://westpole.webex.com/meet/R.Gambelli
A Via Ettore Cristoni, 84 - 40030 Casalecchio di Reno

[https://westpole.it/firma/website.png]<https://westpole.it>  [https://westpole.it/firma/twitter.png] <https://twitter.com/WESTPOLE_SPA>   [https://westpole.it/firma/linkedin.png] <https://www.linkedin.com/company/westpole-italia/>

This email for the D.lgs.196/2003 (Privacy Code) and European Regulation 679/2016/UE (GDPR) may contain confidential and/or privileged information for the exclusive use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient, you must not use, copy, disclose or take any action based on this message or any information here. If you have received this email in error, please contact us (email:privacy@westpole.it) by reply email and delete all copies. Legal privilege is not waived because you have read this email. Thank you for your cooperation.

[https://westpole.it/firma/ambiente.png] Please consider the environment before printing this email

Re: Migrating from Oracle to PostgreSQL

Posted by Woonsan Ko <wo...@apache.org>.
Hi Raffaele,

I have used a RepositoryCopier based solution in my github project:
- https://github.com/woonsanko/recipe-for-hippo-db-migration

It should be a bit slower than a direct db migration tool - if
existing and feasible - but more reliable and safer.
In my recipe, there are some product specific steps, such as extra jar
files, but the solution itself is very generic and simply using the
Jackrabbit RepositoryCopier.

Regards,

Woonsan

On Wed, Feb 24, 2021 at 5:33 AM Raffaele Gambelli
<R....@westpole.it> wrote:
>
> Hi all,
>
> I'm on Jackrabbit 2.14.0, I have an Oracle based installation having a big DEFAULT_BUNDLE table, it is 61787 megabytes:
>
> PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.OraclePersistenceManager
>
> with a file Datastore:
>
> DataStore class="org.apache.jackrabbit.core.data.FileDataStore
>
> I know there is at least one "breaking change", the following one where NODE_ID in PostgreSQL is splitted in two columns:
>
> PostgreSQL
> create table ${schemaObjectPrefix}BUNDLE (NODE_ID_HI bigint not null, NODE_ID_LO bigint not null, BUNDLE_DATA bytea not null, PRIMARY KEY (NODE_ID_HI, NODE_ID_LO))
>
> Oracle
> create table ${schemaObjectPrefix}BUNDLE (NODE_ID raw(16) not null, BUNDLE_DATA blob not null) ${tablespace}
>
> Do you know about any other changes, which could make more difficoult the data migration?
>
> I don't understand if org.apache.jackrabbit.core.RepositoryCopier is a solution in my scenario or if it would be too much slow and so if a different solution would be recommended, but I don't know which...
>
> Thanks for your support, best regards
> [https://westpole.it/firma/logo.png]
>
> Raffaele Gambelli
> WebRainbow(r) Software Developer
>
> P +390518550576
> M 3371641888
> E R.Gambelli@westpole.it
> W https://westpole.webex.com/meet/R.Gambelli
> A Via Ettore Cristoni, 84 - 40030 Casalecchio di Reno
>
> [https://westpole.it/firma/website.png]<https://westpole.it>  [https://westpole.it/firma/twitter.png] <https://twitter.com/WESTPOLE_SPA>   [https://westpole.it/firma/linkedin.png] <https://www.linkedin.com/company/westpole-italia/>
>
> This email for the D.lgs.196/2003 (Privacy Code) and European Regulation 679/2016/UE (GDPR) may contain confidential and/or privileged information for the exclusive use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient, you must not use, copy, disclose or take any action based on this message or any information here. If you have received this email in error, please contact us (email:privacy@westpole.it) by reply email and delete all copies. Legal privilege is not waived because you have read this email. Thank you for your cooperation.
>
> [https://westpole.it/firma/ambiente.png] Please consider the environment before printing this email