Re: Problem reloading regression database - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Problem reloading regression database
Date
Msg-id 896.1010986871@sss.pgh.pa.us
Whole thread Raw
In response to Re: Problem reloading regression database  (Brent Verner <brent@rcfile.org>)
Responses Re: Problem reloading regression database
List pgsql-hackers
Brent Verner <brent@rcfile.org> writes:
> | You'll need to make sure that the code isn't expecting to palloc
> | anything first-time-through and re-use it on later loops, but I
> | think that will be okay.  (The attribute_buf is the most obvious
> | risk, but that's all right, see stringinfo.c.)

> So I /can't/ palloc some things /before/ switching context to 
> per-tuple-context?

Oh, sure you can.  That's the point of having a per-query context.
What I was wondering was whether there were any pallocs executed
*after* entering the loop that the code expected to live across
loop cycles.  I don't think so, I'm just mentioning the risk as
part of your education ;-)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Brent Verner
Date:
Subject: Re: Problem reloading regression database
Next
From: "Andy Samuel"
Date:
Subject: Tablespace and clustering