pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: ROHIT SACHDEVA <sachdeva.rohit648@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Related To Hash Partition
Date: Sun, 23 Apr 2023 11:07:34 -0400
Message-ID: <3840294.1682262454@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKDb7aHVoBa-C-EABeBZhgndZWtNqoZ1feOO3S9A6qLbyH8tMA@mail.gmail.com>
References: <CAKDb7aHVoBa-C-EABeBZhgndZWtNqoZ1feOO3S9A6qLbyH8tMA@mail.gmail.com>

ROHIT SACHDEVA <sachdeva.rohit648@gmail.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





view thread (8+ messages)  latest in thread

Message-ID: <3840294.1682262454@sss.pgh.pa.us>
Permalink:  ../3840294.1682262454@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3840294.1682262454@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sachdeva.rohit648@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Related To Hash Partition
  In-Reply-To: <3840294.1682262454@sss.pgh.pa.us>

* 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