DB size growing exponentially when materialized view refreshedconcurrently (postgres 9.6)

Поиск
Список
Период
Сортировка
От Vikas Sharma
Тема DB size growing exponentially when materialized view refreshedconcurrently (postgres 9.6)
Дата
Msg-id CAN6gwKy6EP4D9O5a1VmPM+YVOKGj7euuGPm9aZVkJHdcwgRtww@mail.gmail.com
обсуждение исходный текст
Ответы Re: DB size growing exponentially when materialized view refreshedconcurrently (postgres 9.6)
Re: DB size growing exponentially when materialized view refreshedconcurrently (postgres 9.6)
Список pgsql-general
Hi All,

I am looking for advice in a issue where two materialized views are being refreshed concurrently and dbsize has grown to 150gb from 4gb in two days.

We use two materialized views to keep processed data for faster query results for a search function. Earlier materialized views were refreshed not concurrently and all was good on DB.

We changed mv refresh to concurrently to take advantage of simultaneous access when mv refreshed. Now the refresh takes slightly longer and but DB size has grown exponentially.

I ran full vacuum on DB and size again reduced to 4gb from 150gb. 

We need to refresh mvs every 5 mins so I created a script to refresh MV concurrently and then running vacuum (full,analyze) on the mv immediately. I hoped it would solve the issue of DB size growing exponentially but it hasn't and size still growing.

Please advice how can I refresh MV concurrently and DB size doesn't grow.

Much appreciated.

Regards
Vikas

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

Предыдущее
От: Vijaykumar Jain
Дата:
Сообщение: Re: [External] Re: Schema/Data conversion opensource tools from MySQLto PostgreSQL
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Too many range table entries error