Truly bizarre behavior with VACUUM FULL?

Поиск
Список
Период
Сортировка
Искать

Truly bizarre behavior with VACUUM FULL?

От:
Josh Berkus <josh@agliodbs.com>
Дата:
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?

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Josh Berkus  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?

От:
Josh Berkus <josh@agliodbs.com>
Дата:
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?

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Josh Berkus  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


FAQ