From: Erik Wienhold <ewie@ewie.name>
To: Jagmohan Kaintura <jagmohan@tecorelabs.com>
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: murmur3 hash binary data migration from Oracle to PostgreSQL
Date: Tue, 25 Apr 2023 04:15:35 +0200 (CEST)
Message-ID: <1167580627.575710.1682388935428@office.mailbox.org> (raw)
In-Reply-To: <CA+cYFtudWbcO9e354SNO2kBcp+KAX3fbb=J_jPyCMSow-6Ao=A@mail.gmail.com>
References: <CA+cYFtudWbcO9e354SNO2kBcp+KAX3fbb=J_jPyCMSow-6Ao=A@mail.gmail.com>
> On 25/04/2023 03:21 CEST Jagmohan Kaintura <jagmohan@tecorelabs.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ewie@ewie.name, jagmohan@tecorelabs.com
Subject: Re: murmur3 hash binary data migration from Oracle to PostgreSQL
In-Reply-To: <1167580627.575710.1682388935428@office.mailbox.org>
References: <CA+cYFtudWbcO9e354SNO2kBcp+KAX3fbb=J_jPyCMSow-6Ao=A@mail.gmail.com> <1167580627.575710.1682388935428@office.mailbox.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox