Re: [PATCHES] Fast COPY after TRUNCATE bug and fix

2007-03-03 Thread Bruce Momjian
Patch applied. Thanks. --- Simon Riggs wrote: It's been pointed out to me that I introduced a bug as part of the recent optimisation of COPY-after-truncate. The attached patch fixes this for me on CVS HEAD. It does

Re: [PATCHES] Fast COPY after TRUNCATE bug and fix

2007-03-01 Thread Simon Riggs
On Wed, 2007-02-28 at 21:09 -0500, Bruce Momjian wrote: Your patch has been added to the PostgreSQL unapplied patches list at: Simon Riggs wrote: It's been pointed out to me that I introduced a bug as part of the recent optimisation of COPY-after-truncate. The attached patch fixes

Re: [PATCHES] Fast COPY after TRUNCATE bug and fix

2007-03-01 Thread Bruce Momjian
Simon Riggs wrote: On Wed, 2007-02-28 at 21:09 -0500, Bruce Momjian wrote: Your patch has been added to the PostgreSQL unapplied patches list at: Simon Riggs wrote: It's been pointed out to me that I introduced a bug as part of the recent optimisation of COPY-after-truncate.

Re: [PATCHES] Fast COPY after TRUNCATE bug and fix

2007-03-01 Thread Andrew Dunstan
what is the point of this?: + void + RelationCacheResetAtEOXact(void) + { + need_eoxact_work = true; + } and why is it declared extern in relcache.h when it is only used in relcache.c? ISTM that there isn't much reason to un-inline the statement, and the patch could be a lot

Re: [PATCHES] Fast COPY after TRUNCATE bug and fix

2007-03-01 Thread Andrew Dunstan
I'm sorry. I misread the patch. I now see it used in index.c. return to normal viewing ... cheers andrew Andrew Dunstan wrote: what is the point of this?: + void + RelationCacheResetAtEOXact(void) + { + need_eoxact_work = true; + } and why is it declared extern in relcache.h

Re: [PATCHES] Fast COPY after TRUNCATE bug and fix

2007-03-01 Thread Simon Riggs
On Thu, 2007-03-01 at 09:12 -0500, Andrew Dunstan wrote: what is the point of this?: + void + RelationCacheResetAtEOXact(void) + { + need_eoxact_work = true; + } and why is it declared extern in relcache.h when it is only used in relcache.c? It is called from index.c and

Re: [PATCHES] Fast COPY after TRUNCATE bug and fix

2007-03-01 Thread Andrew Dunstan
Simon Riggs wrote: On Thu, 2007-03-01 at 09:12 -0500, Andrew Dunstan wrote: what is the point of this?: + void + RelationCacheResetAtEOXact(void) + { + need_eoxact_work = true; + } and why is it declared extern in relcache.h when it is only used in relcache.c? It is called

Re: [PATCHES] Fast COPY after TRUNCATE bug and fix

2007-03-01 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Simon Riggs wrote: You understand that this fixes a bug in CVS HEAD? This is for CVS HEAD only, right? Fixed still go into the queue, but for a shorter amount of time, hopefully. It still needs review ... and the presence of the patch in the queue

Re: [PATCHES] Fast COPY after TRUNCATE bug and fix

2007-02-28 Thread Bruce Momjian
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. ---

[PATCHES] Fast COPY after TRUNCATE bug and fix

2007-02-24 Thread Simon Riggs
It's been pointed out to me that I introduced a bug as part of the recent optimisation of COPY-after-truncate. The attached patch fixes this for me on CVS HEAD. It does this by making an explicit request for relcache hint cleanup at EOXact and takes a more cautious approach during