Re: Related To Hash Partition

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ROHIT SACHDEVA <sachdeva(dot)rohit648(at)gmail(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Related To Hash Partition
Date: 2023-04-23 15:07:34
Message-ID: 3840294.1682262454@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

ROHIT SACHDEVA <sachdeva(dot)rohit648(at)gmail(dot)com> writes:
> While using hash partition i am facing the problem that the data is not
> going into the proper partition table .

Define "proper". It's generally best to assume that the hash function
is a black box --- if you assume you know which partition a given key
value will be mapped to, you are doing something very fragile, and people
will have no sympathy for you when it breaks.

If you want a predictable mapping, use list or range partitioning,
not hash.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message ROHIT SACHDEVA 2023-04-23 17:34:53 Re: Related To Hash Partition
Previous Message ROHIT SACHDEVA 2023-04-23 07:04:15 Related To Hash Partition