Re: DB Size - How much is growing - PostgreSQL 9.2

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: DB Size - How much is growing - PostgreSQL 9.2
Дата
Msg-id CAKFQuwYkz93H+SQJdikrB-fUN7SZ==tvdspSPSC_6DrvkK-5iQ@mail.gmail.com
обсуждение исходный текст
Ответ на DB Size - How much is growing - PostgreSQL 9.2  ("drum.lucas@gmail.com" <drum.lucas@gmail.com>)
Список pgsql-admin
On Mon, Apr 18, 2016 at 3:46 PM, drum.lucas@gmail.com <drum.lucas@gmail.com> wrote:
Hi all,

I'm using the following query to get the actual size of my DB:
select t1.datname AS db_name,  
       pg_size_pretty(pg_database_size(t1.datname)) as db_size
from pg_database t1
order by pg_database_size(t1.datname) desc;

However I need to know how big is the database over the last month...
Need to know how much has the DB grown up by month...

I did had a Munin and MRTG graphs but the server went down and we don't have access to it anymore...

Is there any way to me get those data?


​Take a measurement now, wait a month, take another measurement, the extrapolate backwards...​

​There is no way to execute a query within a running PostgreSQL cluster/database and obtain its size at any other time besides that exact moment.

Without access to some past measurement knowing the present size does you little good when it comes to estimating change - you need at least two data points.  If you happen to have a pg_dump from the past and one from now you could use that for extrapolation purposes.

David J.

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

Предыдущее
От: "drum.lucas@gmail.com"
Дата:
Сообщение: DB Size - How much is growing - PostgreSQL 9.2
Следующее
От: "drum.lucas@gmail.com"
Дата:
Сообщение: Tablespace - PostgreSQL 9.2