On Sun, Dec 6, 2015 at 7:30 PM, Jim Nasby <jim.na...@bluetreble.com> wrote: > On 9/14/15 7:24 AM, Jan Wieck wrote: >> On 09/12/2015 11:35 AM, Kevin Grittner wrote: >> >>> On the other hand, a grep indicates that there are two places that >>> MemoryContextData.nextchild is set (and we therefore probably need >>> to also set the new field), and Jan's proposed patch only changes >>> one of them. If we do this, I think we need to change both places >>> that are affected, so ResourceOwnerCreate() in resowner.c would >>> need a line or two added. >> >> ResourceOwnerCreate() sets ResourceOwnerData.nextchild, not >> MemoryContextData.nextchild. > > Anything ever happen with this? </Momjian-Mode>
Jan was right; the code for operating on resource owners was similar enough that I mistook it for memory context code in a quick review of grep results looking for any places that Jan might have missed. I went over it all again and couldn't resist adding an Assert() at one point, but otherwise it looks good. An optimized build without assertions runs his 20000 statement DO test in 25646.811 ms without the patch and 2933.754 ms with the patch. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers