I have applied a patch based on Tom's suggestion that will disable
VACUUM in a function in 7.3.
---
Rod Taylor wrote:
> 7.2 crashes with the below function:
>
> CREATE OR REPLACE FUNCTION runMaintenance()
> RETURNS BOOL AS
Bruce Momjian <[EMAIL PROTECTED]> writes:
> Oops, I see now. How is this?
Better. A comment explaining what the thing is doing would help too.
regards, tom lane
---(end of broadcast)---
TIP 6: Have you searched our list a
Oops, I see now. How is this?
Remember, I am not incredibly capable, just persistent. :-)
---
Tom Lane wrote:
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > *** src/backend/commands/vacuum.c 12 Apr 2002 20:38:25 -
Bruce Momjian <[EMAIL PROTECTED]> writes:
> *** src/backend/commands/vacuum.c 12 Apr 2002 20:38:25 - 1.223
> --- src/backend/commands/vacuum.c 14 Apr 2002 16:41:37 -
> ***
> *** 181,186
> --- 181,189
> if (IsTransactionBlock())
> elog(
Here is a patch with a fix outlined by Tom:
test=> CREATE OR REPLACE FUNCTION runMaintenance()
test-> RETURNS BOOL AS '
test'> VACUUM;
test'> SELECT TRUE;
test'> ' LANGUAGE sql;
CREATE
test=>
test=> select runMaintenanc
Tom Lane wrote:
> "Rod Taylor" <[EMAIL PROTECTED]> writes:
> > 7.2 crashes with the below function:
> > CREATE OR REPLACE FUNCTION runMaintenance()
> > RETURNS BOOL AS '
> > VACUUM;
> > SELECT TRUE;
> > ' LANGUAGE sql;
>
> AFAICS there is no way that we can support VACUUM inside a function;
>
"Rod Taylor" <[EMAIL PROTECTED]> writes:
> 7.2 crashes with the below function:
> CREATE OR REPLACE FUNCTION runMaintenance()
> RETURNS BOOL AS '
> VACUUM;
> SELECT TRUE;
> ' LANGUAGE sql;
AFAICS there is no way that we can support VACUUM inside a function;
the forced transaction commits that
"Rod Taylor" <[EMAIL PROTECTED]> 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 a
7.2 crashes with the below function:
CREATE OR REPLACE FUNCTION runMaintenance()
RETURNS BOOL AS '
VACUUM;
SELECT TRUE;
' LANGUAGE sql;
I was going to toss a bunch of system maintenance stuff in a database
function to make administration for those who administer the boxes
(not me -- I just t