Search Postgresql Archives

Re: Table growing faster than autovacuum can vacuum

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/15/12 8:46 AM, Asher Hoskins wrote:
I've got a database with a very large table (currently holding 23.5 billion rows,

a table that large should probably be partitioned, likely by time. maybe a partition for each month. as each partition is filled, it can be VACUUM FREEZE'd since it will never be modified again. if you're doing your batch inserts of 1-2 billion rows once a month or so, perhaps that should be the partition right there.

since you're inserting the new data sequentially, and not doing UPDATEs, there's no point in doing VACUUM FULL, just a plain vacuum.....

so, your ~ monthly batch run could be something like...

    create new partition table
    copy/insert your 1-2 billion rows
    vacuum analyze (NOT full) new table
    vacuum freeze new table
    update master partition table rules

this way, autovacuum won't even bother with these tables.



--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux