From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Pavan Deolasee <pavan.deolasee@gmail.com>
Cc: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Cc: Andres Freund <andres@anarazel.de>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Cc: Peter Geoghegan <pg@bowt.ie>
Subject: Re: ON CONFLICT DO UPDATE for partitioned tables
Date: Thu, 19 Apr 2018 16:40:17 -0300
Message-ID: <20180419194017.xeqvcndqsslojqk2@alvherre.pgsql> (raw)
In-Reply-To: <20180419172054.3ei6gf55kuu2ofyk@alvherre.pgsql>
Alvaro Herrera wrote:
> Amit Langote wrote:
>
> > Yeah, I too have wondered in the past what it would take to make
> > equalTupDescs() return true for parent and partitions. Maybe we can make
> > it work by looking a bit harder than I did then.
>
> How about simply relaxing the tdtypeid test from equalTupleDescs? I
> haven't looked deeply but I think just checking whether or not both are
> RECORDOID might be sufficient, for typecache purposes.
After looking at the code, I'm a bit nervous about doing this, because I
don't fully understand what is going on in typcache, and what is the
HeapTupleHeaderGetTypeId macro really doing. I'm afraid that if we
confuse a table's tupdesc with one of its partition's , something
entirely random might end up happening.
Maybe this is completely off-base, but if so I'd like to have to proof.
So I'm thinking of reverting that patch instead per your patch.
While composing this we got emails from Robert and Peter G suggesting
the same too, so consider it done.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, Langote_Amit_f8@lab.ntt.co.jp, pavan.deolasee@gmail.com, fujita.etsuro@lab.ntt.co.jp, andres@anarazel.de, pg@bowt.ie
Subject: Re: ON CONFLICT DO UPDATE for partitioned tables
In-Reply-To: <20180419194017.xeqvcndqsslojqk2@alvherre.pgsql>
* 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