Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-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

pgsql-hackers by date

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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group