Should a DB vacuum use up a lot of space ?

Поиск
Список
Период
Сортировка
От Philippe Girolami
Тема Should a DB vacuum use up a lot of space ?
Дата
Msg-id 00953EDF-E336-4B61-B96C-5C3ECA60BA8D@mosaik.com
обсуждение исходный текст
Ответы Re: Should a DB vacuum use up a lot of space ?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Should a DB vacuum use up a lot of space ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general

Hi all,

 

We’ve got a 16TB database that’s run up against the wrap-around tx id issue (despite running auto-vacuum):

  ERROR:  database is not accepting commands to avoid wraparound data loss in database "public"

  HINT:  Stop the postmaster and use a standalone backend to vacuum that database.

 

The message says to VACUUM the whole database so we’ve dropped down to single user mode and issued a “vacuum verbose” command on the backend

 

1)       Unlike other times I’ve run vacuum verbose, I’m not getting any logging message at all (for the past 9 hours)

2)       File system usage is going steadily up (3TB over the past 9 hours). Why is that ? I didn’t expect additional disk usage and we’re going to run into disk space usage if this keeps up.

3)       Was a database-wide vacuum required or could I have just figured out which tables needed to be vacuumed and vacuumed those (my understanding was no), for example using http://dba.stackexchange.com/a/35234 and a query such as                     SELECT c.oid::regclass as table_name,       greatest(age(c.relfrozenxid),age(t.relfrozenxid)) as age FROM pg_class c LEFT JOIN pg_class t ON c.reltoastrelid = t.oid WHERE c.relkind IN ('r', 'm') order by 2 desc limit 10;

4)       Assuming I could have just identified individual tables that required vacuuming, can I CTRL-C the current vacuum process without running into issues ?

 

Thanks

Philippe Girolami

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

Предыдущее
От: Patrick B
Дата:
Сообщение: Re: Question about wal files / pg_xlogs
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Should a DB vacuum use up a lot of space ?