Re: Valgrind-detected bug in partitioning code

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stephen Frost <sfrost(at)snowman(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Valgrind-detected bug in partitioning code
Date: 2017-01-24 14:02:51
Message-ID: CA+Tgmoa98FfK6y3VQfcmDgDFk3gLvi5Aihghn2G5zymrfz4bWg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 23, 2017 at 12:45 AM, Amit Langote
<Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> Sorry for jumping in late. Attached patch replaces the call to
> partitioning-specific comparison function by the call to datumIsEqual().
> I wonder if it is safe to assume that datumIsEqual() would return true for
> a datum and copy of it made using datumCopy(). The latter is used to copy
> a single datum from a bound's Const node (what is stored in the catalog
> for every bound).

Thanks, committed. I expanded the comment in partition.c because I
think you missed the other rationale for doing it this way, which is
that the partitioning operator might ignore some "unimportant" changes
(e.g. for numeric, the difference between 1.0 and 1.00) but for this
purpose it's better to update the relcache if there is *any* change.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-01-24 14:08:27 Re: [PATCH] Generic type subscription
Previous Message Robert Haas 2017-01-24 13:51:02 Re: Declarative partitioning vs. BulkInsertState