Re: Fwd: How does the partitioned lock manager works?

From: "Cui Shijun" <rancpine(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fwd: How does the partitioned lock manager works?
Date: 2007-04-28 06:10:33
Message-ID: 306760850704272310n7b6ca5d9ief224427aece62f8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ah... It seems that a item is calculated its hash value, get the bucket
number from it and insert into that bucket "chain". The insertion has
nothing to do with partition number(but Alvaro says "which hash is
used depends on the partition number". I haven't really understood
this: how can we get a hash value without deciding which hash to
use? ). However, when we travel along a chain to get a item, we can
infer its partition number from its hash value.

My problem is, I'm not so sure about the process stated above,
because in that way, items in ONE chain may belong to different
partitions,and it is obviously conflicted with "so that different
partitions use different hash chains" as README mentioned.

2007/4/28, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> It's not that hard: the bucket number is some number of low-order bits
> of the hash value, and the partition number is some smaller (or at most
> equal) number of low-order bits of the hash value.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2007-04-28 08:06:25 Re: Fwd: How does the partitioned lock manager works?
Previous Message Tom Lane 2007-04-28 05:31:26 Re: Fwd: How does the partitioned lock manager works?