Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY - Mailing list pgsql-hackers

From Amit Langote
Subject Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY
Date
Msg-id CA+HiwqFVVs8wcdPV0fVQXd7+-uhXzTTJLTF4nC_L_avL0+NcZA@mail.gmail.com
Whole thread Raw
In response to Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY
List pgsql-hackers
Thanks for the updated patch.  I've been reading it, but I noticed a
bug in 8aba9322511f, which I thought you'd want to know to make a note
of when committing this one.

So we decided in 8aba9322511f that it is okay to make the memory
context in which a transient partdesc is allocated a child of
PortalContext so that it disappears when the portal does.  But
PortalContext is apparently NULL when the planner runs, at least in
the "simple" query protocol, so any transient partdescs built by the
planner would effectively leak.  Not good.

With this patch, partdesc_nodetached is no longer transient, so the
problem doesn't exist.

I will write more about the updated patch in a bit...

-- 
Amit Langote
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [BUG] "FailedAssertion" reported when streaming in logical replication
Next
From: Peter Eisentraut
Date:
Subject: Re: SQL-standard function body