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

From Tom Lane
Subject Re: Problem reloading regression database
Date
Msg-id 21602.1011063143@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  (Brent Verner <brent@rcfile.org>)
Re: Problem reloading regression database  (Brent Verner <brent@rcfile.org>)
Re: Problem reloading regression database  (Brent Verner <brent@rcfile.org>)
List pgsql-hackers
Brent Verner <brent@rcfile.org> writes:
> gotcha.  No, I don't think anything inside that loop expects to 
> persist across iterations.  The attribute_buf is static to the
> file, and initialized in DoCopy.

There is more to attribute_buf than meets the eye ;-)

> What I ended up doing is switching to per-tuple-context prior to 
> the input loop, then switching back to the (saved) query-context
> after exiting the loop.  I followed ResetTupleExprContext back, and
> it doesn't seem to do anything that would require a switch per loop.
> Are there any problems this might cause that I'm not seeing  with 
> my test case?

I really don't feel comfortable with running heap_insert or the
subsequent operations in a per-tuple context.  Have you tried any
test cases that involve triggers or indexes?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Lincoln Yeoh
Date:
Subject: Re: bug in permission handling?
Next
From: Tom Lane
Date:
Subject: Re: Theory about XLogFlush startup failures