Re: crash with sql language partition support function - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: crash with sql language partition support function
Date
Msg-id CAFjFpRdOGmj5XVBr3PrPVfQ2wU=A1WOiLwcgA3hZCnmEAz3d2Q@mail.gmail.com
Whole thread Raw
In response to crash with sql language partition support function  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Responses Re: crash with sql language partition support function  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On Tue, Apr 10, 2018 at 1:44 PM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
>
> Attached fixes it.  It teaches RelationBuildPartitionKey() to use
> fmgr_info_cxt and pass rd_partkeycxt to it.

The patch is using partkeycxt and not rd_partkeycxt. Probably a typo
in the mail. But a wider question, why that context? I guess that
cache context will vanish when that cache entry is thrown away. That's
the reason we have to copy partition key information in
find_partition_scheme() instead of just pointing to it and also use
fmgr_info_copy() there. But if that's the case, buildfarm animal run
with -DCLOBBER_CACHE_ALWAYS should show failure. I am missing
something here.

-- 
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [PATCH][PROPOSAL] Refuse setting toast.* reloptions when TOASTtable does not exist
Next
From: David Steele
Date:
Subject: Re: [HACKERS] logical decoding of two-phase transactions