Re: Postgresql 8.4.1 segfault, backtrace - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Postgresql 8.4.1 segfault, backtrace
Date
Msg-id 2741.1253839813@sss.pgh.pa.us
Whole thread Raw
In response to Re: Postgresql 8.4.1 segfault, backtrace  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
"Michael Brown" <mbrown@fensystems.co.uk> writes:
> If temporary table drops count towards this, then yes.

Yeah, they do.

> I could fairly easily change this procedure to truncate rather than drop
> the temporary table, if that would lessen the exposure to the problem.
> Would that be likely to help?

Very probably.  It's not a complete fix but it would probably reduce the
cache inval traffic (and hence the risk) by an order of magnitude.
However, please be prepared to change back after I send you the backend
fix, so you can stress-test it ;-)

> (Alternatively, given that the temporary table usage here is quite
> inelegant, is there a better way to obtain a consistent database snapshot
> across multiple queries without using SERIALIZABLE when inside a PL/pgSQL
> function that has to be marked VOLATILE?)

Maybe you could accumulate the data you need in a local array instead,
but that would be a big rewrite.  A cursor might be a possibility too.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5080: test tablespace failure
Next
From: Tom Lane
Date:
Subject: Re: Postgresql 8.4.1 segfault, backtrace