Re: murmur3 hash binary data migration from Oracle to PostgreSQL

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: Jagmohan Kaintura <jagmohan(at)tecorelabs(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: murmur3 hash binary data migration from Oracle to PostgreSQL
Date: 2023-04-25 02:15:35
Message-ID: 1167580627.575710.1682388935428@office.mailbox.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On 25/04/2023 03:21 CEST Jagmohan Kaintura <jagmohan(at)tecorelabs(dot)com> wrote:
>
> We are doing Migration from Oracle to PostgreSQL. In SOurce database we have
> Binary data stored using murmur3 hashing function. In Oracle this data is
> being generated from the Java code and inserted into the Oracle database.

Do you store the hash and the binary data? The hash is a key to the binary
data?

> As part of Migration processes the reference data on which this murmur3 is
> generated is also getting changed while migrating to PostgreSQL.

Why is the data changing during migration? Shouldn't a migration preserve
the data and only adapt it if the database model needs to change?

> In PostgreSQL do we have any mechanism for fetching this murmur3 hash
> function for any UUID.

I don't understand what you mean by that. What does it have to do with UUID?

Do you want to generate the MurmurHash in Postgres? Postgres has no builtin
support for that hash function and I can't find any extension in a quick
online search.

Or do you want to just look up rows by the MurmurHash? That's a trivial
SELECT statement. Store the hash in an indexed column of type bytea to have
performant lookups.

--
Erik

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2023-04-25 03:06:28 Re: wiki.postgres ​ Tighten trigger permission checks already resolved
Previous Message jian he 2023-04-25 02:09:43 wiki.postgres ​ Tighten trigger permission checks already resolved