Thread: Truly bizarre behavior with VACUUM FULL?

Truly bizarre behavior with VACUUM FULL?

From
Josh Berkus
Date:
Folks,

I have a system on a 7.2.4 database.  Let me tell you what appears to be
happening:

I have a bug-fixed version of a function, which replaced a buggy version of
the function via CREATE OR REPLACE.  Each night, when the database goes
through VACUUM FULL, the old (buggy) version of the function seems to
overwrite the new (correct) version of the function.

Is it possible that VACUUM FULL is restoring the discarded tuple in the system
table and dropping the valid one?

I can think of ways to fix this bizarre behavior, but thought that someone
might want to look at it first.

--
-Josh BerkusAglio Database SolutionsSan Francisco



Re: Truly bizarre behavior with VACUUM FULL?

From
Tom Lane
Date:
Josh Berkus <josh@agliodbs.com> writes:
> Is it possible that VACUUM FULL is restoring the discarded tuple in
> the system table and dropping the valid one?

Fairly difficult to believe...

What is causing the new improved version to come back again?  Are you
doing another manual CREATE OR REPLACE each day?  How exactly?
        regards, tom lane



Re: Truly bizarre behavior with VACUUM FULL?

From
Josh Berkus
Date:
Tom,

> What is causing the new improved version to come back again?  Are you
> doing another manual CREATE OR REPLACE each day?  How exactly?

Manual CREATE OR REPLACE, yes.   And then I test it.   And it works for the
rest of the day ...

--
-Josh BerkusAglio Database SolutionsSan Francisco



Re: Truly bizarre behavior with VACUUM FULL?

From
Tom Lane
Date:
Josh Berkus <josh@agliodbs.com> writes:
>> What is causing the new improved version to come back again?  Are you
>> doing another manual CREATE OR REPLACE each day?  How exactly?

> Manual CREATE OR REPLACE, yes.   And then I test it.   And it works for the 
> rest of the day ...

So try a VACUUM FULL right after you fix it, instead of waiting for the
cron job to fire.

My bet is that there is something else being done by your nightly script
that is restoring the old definition.
        regards, tom lane