Re: 7.2 crash...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rod Taylor" <rbt(at)zort(dot)ca>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: 7.2 crash...
Date: 2002-03-20 05:25:09
Message-ID: 14663.1016601909@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

"Rod Taylor" <rbt(at)zort(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2002-03-22 04:22:58 Re: 7.2 crash...
Previous Message Robert E. Bruccoleri 2002-03-20 00:54:29 Re: Bug #612: PostgreSQL 7.2 does not build according to documentation under IRIX w/ MIPSpro

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-03-20 05:27:28 Re: [HACKERS] Fixes gram.y
Previous Message Christopher Kings-Lynne 2002-03-20 05:10:04 Help with SET NULL/SET NOT NULL