Re: Creating foreign key on partitioned table is too slow - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Creating foreign key on partitioned table is too slow
Date
Msg-id 20191113200011.GA13341@alvherre.pgsql
Whole thread Raw
In response to Re: Creating foreign key on partitioned table is too slow  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Creating foreign key on partitioned table is too slow  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On 2019-Nov-13, Tom Lane wrote:

> (BTW, a different question one could ask is exactly why
> RelationBuildPartitionDesc is so profligate of leaked memory.)

The original partitioning code (f0e44751d717) decided that it didn't
want to bother with adding a "free" routine for PartitionBoundInfo
structs, maybe because it had too many pointers, so there's no way for
RelationBuildPartitionDesc to free everything it allocates anyway.  We
could add a couple of pfrees and list_frees here and there, but for the
main thing being leaked we'd need to improve that API.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Invisible PROMPT2
Next
From: Andres Freund
Date:
Subject: Re: JIT performance bug/regression & JIT EXPLAIN