Skip site navigation (1) Skip section navigation (2)

Re: Why does my DB size differ between Production and DR? (Postgres 8.4)

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Aleksey Tsalolikhin <atsaloli(dot)tech(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why does my DB size differ between Production and DR? (Postgres 8.4)
Date: 2011-02-01 03:52:08
Message-ID: AANLkTi=PfEAWeOs-Q3HNffX_LM040EdOMt3kAtpJkUDK@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
On Mon, Jan 31, 2011 at 5:54 PM, Aleksey Tsalolikhin
<atsaloli(dot)tech(at)gmail(dot)com> wrote:
> Situation:  Disk usage on production server root filesystem is at 68%
> utilization (80 GB used), on DR is at 51% (56 GB used).   We use
> SlonyII-1.2.x to keep the DR up to date.  I would like to account for
> the 24 GB difference.

This is likely free space in your database.  Some of it is completely
normal and actually improves performance.  Too much and your db is
bloated and things starting taking too long.

You can reclaim that space by doing a cluster or vacuum full on the
subject table.  Setting fill factor ahead of time to something in the
90% range should cut down on bloat as future updates can then happen
in place, and also will improve performance of the system as updates
happen in the same page and if they're not indexed don't require index
updates as well (Heap Only Tuple updates, or HOT updates use this
method)

In response to

Responses

pgsql-general by date

Next:From: Joshua TolleyDate: 2011-02-01 05:40:22
Subject: Re: Automatic database monitoring tool for PostgreSQL... new project
Previous:From: Thom BrownDate: 2011-02-01 02:17:17
Subject: Re: Issues with generate_series using integer boundaries

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group