Partition by hash formula - Mailing list pgsql-general

From Vlad Bokov
Subject Partition by hash formula
Date
Msg-id c4d46ba3-d8b4-6659-f163-110bdd2184b4@razum2um.me
Whole thread Raw
Responses Re: Partition by hash formula  (Laurenz Albe <laurenz.albe@cybertec.at>)
List pgsql-general
Hello,

recently I read
https://blog.dbi-services.com/hash-partitioning-in-postgresql-11/
and reproduced steps from the, which gave exact same count outcome,
which made me think
hashing is a pure function.

Examined the data I saw following distribution:
dept_1: 1,14,39...; dept_2: 3,11,21...; dept_3: 16,18,25...

I also found commit 1aba8e651a introducing the feature, but I'm not too
much into internals.
I wonder, could somebody write that hashing formula in pseudo-code or
point to specific place in the code, please?

Thanks,
Vlad




pgsql-general by date:

Previous
From: Matt Magoffin
Date:
Subject: Duplicate key violation on upsert
Next
From: Gergely Riskó
Date:
Subject: promise postgres that I will only ROLLBACK