Re: is it safe to drop 25 tb schema with cascade option?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: is it safe to drop 25 tb schema with cascade option?
Дата
Msg-id 15554.1568929375@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: is it safe to drop 25 tb schema with cascade option?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: is it safe to drop 25 tb schema with cascade option?
Список pgsql-general
Adrian Klaver <adrian.klaver@aklaver.com> writes:
> On 9/19/19 2:24 PM, Julie Nishimura wrote:
>> Or you meant we need to run vacuum on 'my_db_name' without parameters,  
>> that it runs for every table? I am just not sure how long it will take 
>> to run for 39 tb...:(

> Not sure. The bottom line is you are running out of transaction ids and 
> if the txid counter wraps things get ugly. You could try vacuuming 
> individual non-system tables that have a lot of churn(UPDATES/DELETES) 
> and see if that buys you some ids.

You're going to have to vacuum *all* of them to get the global freeze
counter to advance, as it's basically just the min of the per-table
pg_class.relfrozenxid values.  It might be worth looking at
age(relfrozenxid) to see which tables are furthest back, as those
are the one(s) holding things up; but if you've not been running
autovacuum then it's likely that they are all old.

Do NOT NOT NOT use VACUUM FULL here.  It will not make things any
better than a plain VACUUM, and it will take a lot longer ... time
you maybe haven't got.

            regards, tom lane



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: is it safe to drop 25 tb schema with cascade option?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: is it safe to drop 25 tb schema with cascade option?