Re: vacuum process taking more than 33 hours

Поиск
Список
Период
Сортировка
От Ezequiel Luis Pellettieri
Тема Re: vacuum process taking more than 33 hours
Дата
Msg-id 86aad3420701150644j5beef392q7007324f3d7008a@mail.gmail.com
обсуждение исходный текст
Ответ на Re: vacuum process taking more than 33 hours  (Andrew Sullivan <ajs@crankycanuck.ca>)
Ответы Re: vacuum process taking more than 33 hours
Список pgsql-sql
Hi Andrew,

Why don't you try droping all indexes exept but the constraints ones for each table.
then you'll free aprox half of DB size. then re-create indexes,  one by one. and finally you can perform a full vacuum.

that worked for me. :)

cheers

pelle.-

2007/1/15, Andrew Sullivan <ajs@crankycanuck.ca>:
On Mon, Jan 15, 2007 at 06:23:23AM -0800, Mario Behring wrote:
> Hi all,
>
> I've executed a VACUUM FULL on a database 33GB in size. The process
> was going fine until it reached a index (I guess it's an index) and
> there it stopped for more than 30 hours...........the whole
> weekend......

It may not have been doing anything.  VACUUM FULL needs to take an
exclusive lock on each table it is processing.  It may have been
waiting for that lock.

> I've canceled it but I desperately need to free some space at the
> server's disk. I was thinking about using the TRUNCATE statement at
> the table I know to be the largest one. I have some questions
> though:

TRUNCATE and VACUUM are different beasts.  VACUUM recovers space from
deleted or updated rows.  If you have done neither of those things,
then it won't recover any space.  TRUNCATE is like DELETE on
steriods: it simply removes all the data from your table.

TRUNCATE will indeed recover disk, although I can't remember whether
it actually returns that disk space to the operating system, or
whether it remains allocated for the table in question by postgres.
If the latter, a VACUUM FULL on the table in question ought to be
enough to get you the space back.

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
The fact that technology doesn't work is no bar to success in the marketplace.
                --Philip Greenspun

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq



--
Saludos cordiales. Ezequiel L. Pellettieri

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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: vacuum process taking more than 33 hours
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: vacuum process taking more than 33 hours