Re: dead tuples

From: tgoodaire(at)linux(dot)ca (Tim Goodaire)
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: dead tuples
Date: 2005-07-22 17:43:48
Message-ID: 20050722174348.GA13696@dahmer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Fri, Jul 22, 2005 at 01:31:50PM -0400, Oren Mazor wrote:
> what happens is that my database files grow significantly. say i have a
> table filled with people names, and i modify each one, then my database
> seems to double. this is because (afaik) pg marks the old ones as 'dead'
> but doesnt delete them. you run vacuum to reclaim it.
>
> which is what i do. but i'm wondering if there's any way to circumvent the
> entire process of marking them as 'dead' and just deleting things right
> off when they get updated

No. There isn't a way to circumvent this. Just set up a cron job to
regularly vacuum your database and you won't have to worry about your
database getting big due to dead tuples.

Tim

>
> On Fri, 22 Jul 2005 13:29:19 -0400, Bruno Wolff III <bruno(at)wolff(dot)to> wrote:
>
> >On Fri, Jul 22, 2005 at 10:02:55 -0400,
> > Oren Mazor <oren(dot)mazor(at)gmail(dot)com> wrote:
> <snip>
> >
> >What problem are you trying to solve?
> >
> >The way Postgres implements MVCC leaves deleted tuples for later clean up
> >after they aren't visible to any currently open transaction. This clean
> >up
> >is done with vacuum.
>
>
>
> --
> Oren Mazor // Developer, Sysadmin, Explorer
> GPG Key: http://www.grepthemonkey.org/secure
> "Ut sementem feceris, ita metes"
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>

--

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Oren Mazor 2005-07-22 17:53:22 Re: dead tuples
Previous Message Bruno Wolff III 2005-07-22 17:40:12 Re: dead tuples