From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: plpgsql versus domains |
Date: | 2015-03-01 17:32:10 |
Message-ID: | 23989.1425231130@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> writes:
> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Tom> This is the first attempt at weaponizing the memory context
> Tom> reset/delete feature, and I'm fairly happy with it, except for one
> Tom> thing: I had to #include utils/memnodes.h into typcache.h in order
> Tom> to preserve the intended property that the callback structs could
> Tom> be included directly into structs using them. Now, that's not
> Tom> awful in itself, because typcache.h isn't used everywhere; but if
> Tom> this feature gets popular we'll find memnodes.h being included
> Tom> pretty much everywhere, which is not so great. I'm thinking about
> Tom> moving struct MemoryContextCallback and the extern for
> Tom> MemoryContextRegisterResetCallback into palloc.h to avoid this.
> Tom> Maybe that's too far in the other direction. Thoughts?
> Tom> Compromise ideas?
> This was pretty much my first thought on looking at the callback
> patch. It may seem logical to put the reset callback stuff in
> memutils/memnodes alongside context creation and reset and so on, but in
> fact the places that are going to want to use callbacks are primarily
> _not_ the places that are doing their own context management - since
> those could do their own cleanup - but rather places that are allocating
> things in contexts supplied by others. So palloc.h is the place for it.
That argument sounds good to me ;-). Moved.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Dean Rasheed | 2015-03-01 18:13:59 | Re: Improving RLS qual pushdown |
Previous Message | Stephen Frost | 2015-03-01 17:28:22 | Re: Odd behavior of updatable security barrier views on foreign tables |