Re: ON CONFLICT DO UPDATE for partitioned tables - Mailing list pgsql-hackers

From Amit Langote
Subject Re: ON CONFLICT DO UPDATE for partitioned tables
Date
Msg-id aeb94fa2-b51c-dd63-929f-6de607add76c@lab.ntt.co.jp
Whole thread Raw
In response to Re: ON CONFLICT DO UPDATE for partitioned tables  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On 2018/04/20 4:40, Alvaro Herrera wrote:
> 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.

Thank you for committing the patch.

Regards,
Amit



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Problem while setting the fpw with SIGHUP
Next
From: Peter Geoghegan
Date:
Subject: Re: Corrupted btree index on HEAD because of covering indexes