From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Maksim Milyutin <milyutinma(at)gmail(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Subject: | Re: Proposal: Local indexes for partitioned table |
Date: | 2017-11-03 17:30:42 |
Message-ID: | 20171103173042.rgtuwowlfbv54sae@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > We could do that, but the motivation for the current system was to
> > avoid leaking memory in a long-lived context.
Yeah, my approach here is to use a CATCH block that deletes the memory
context just created, thus avoiding a long-lived leak.
Tom Lane wrote:
> Another key point is to avoid leaving a corrupted relcache entry behind
> if you fail partway through.
Sure ... in the code as I have it we only assign the local variable to
the relcache entry if everything is succesful. So no relcache
corruption should result.
> It might work to build the new key in a context that's initially a
> child of CurrentMemoryContext, then reparent it to be a child of
> CacheMemoryContext when done.
That's another way (than the PG_TRY block), but I think it's more
complicated with no gain.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2017-11-03 17:31:55 | Re: ucs_wcwidth vintage |
Previous Message | Peter Eisentraut | 2017-11-03 16:36:01 | Re: Subscriber resets additional columns to NULL on UPDATE |