From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Vlad Bokov <vlad(at)razum2um(dot)me>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Partition by hash formula |
Date: | 2020-03-20 13:35:01 |
Message-ID: | 228515d1e1204eda0844a05fbe0c0d7e10c34c87.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 2020-03-20 at 12:50 +0300, Vlad Bokov wrote:
> 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?
Look for the int4hashfast, texthashfast and similar functions in
src/backend/utils/cache/catcache.c
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
From | Date | Subject | |
---|---|---|---|
Next Message | Ravi Krishna | 2020-03-20 14:48:43 | How to get RAISE INFO in JDBC |
Previous Message | Laurenz Albe | 2020-03-20 13:32:03 | Re: Wal receiver process listens to physical IP |