Re: Please HELP - URGENT - transaction wraparound error

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Please HELP - URGENT - transaction wraparound error
Дата
Msg-id 20051030190500.GC19496@svana.org
обсуждение исходный текст
Ответ на Re: Please HELP - URGENT - transaction wraparound error  (John Sidney-Woollett <johnsw@wardbrook.com>)
Ответы Re: Please HELP - URGENT - transaction wraparound error  (John Sidney-Woollett <johnsw@wardbrook.com>)
Список pgsql-general
On Sun, Oct 30, 2005 at 06:41:45PM +0000, John Sidney-Woollett wrote:
> Hmm. I'm pretty sure that database mail_lxtreme was unused (no
> connections/activity) - I didn't think that it would need to be vacuumed
> at all...

A database that is never used still needs to be vacuumed. The only
exception is if you VACUUM FREEZE which puts the entire database in a
frozen state which will never need vacuuming. This is how template0 is
configured. Ofcourse, once you make changes...

> Just out of curiousity would the wraparound error (for mail_lxtreme)
> actually have affected data in bp_live?

I doubt it but (thinking shared tables) I'll have to defer to someone
more knowledgable.

> Could I just have deleted mail_lxtreme and then continued to use bp_live
> as though nothing had happened?
>
> Or had database bp_live already been damaged by the wraparound?

Everything would probably have been fine.

BTW, I would have thought this message would have been appearing the
last billion transactions or so, didn't anyone notice?

To solve this forever, setup a cronjob for once a month:

vacuumdb -a

This will vacuum every database, even if you don't know the names or
where they came from. AIUI when you vacuum a database whose
transactions are over billion transactions old it automatically puts it
in "frozen" state. If someone had happened to run "vacuumdb -a" anytime
in the last few months, you might never have noticed the wraparound...

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: create table in transaction fails
Следующее
От: Matthew Peter
Дата:
Сообщение: Re: function example?