Re: [BUGS] 7.2 crash... - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [BUGS] 7.2 crash...
Date
Msg-id 14663.1016601909@sss.pgh.pa.us
Whole thread Raw
List pgsql-hackers
"Rod Taylor" <rbt@zort.ca> writes:
> 7.2 crashes with the below function:

> CREATE OR REPLACE FUNCTION runMaintenance()
> RETURNS BOOL AS '
>   VACUUM;
>   SELECT TRUE;
> ' LANGUAGE sql;

Ugh.  The problem is that VACUUM's implicit CommitTransaction calls
wipe out all the transient memory allocated by the function evaluation.
I don't see any reasonable way to support VACUUM inside a function
call; I think we have to prohibit it.

Unfortunately I don't see any clean way to test for this situation
either.  VACUUM's IsTransactionBlock() test obviously doesn't get the
job done.  Any ideas how to catch this?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_clog troubles
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] Fixes gram.y