Re: A 154 GB table swelled to 527 GB on the Slony slave. How to compact it?

From: Aleksey Tsalolikhin <atsaloli(dot)tech(at)gmail(dot)com>
To: Vick Khera <vivek(at)khera(dot)org>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: A 154 GB table swelled to 527 GB on the Slony slave. How to compact it?
Date: 2012-03-15 02:24:57
Message-ID: CA+jMWofc2FtRYMX0883dZmrBNabnG7CzfB54NcfsVD8JxQAtNA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Mar 13, 2012 at 5:14 AM, Vick Khera <vivek(at)khera(dot)org> wrote:
> I'll bet what happened was postgres re-wrote your table for you,
> effectively doing a compaction.  You can get similar effect by doing
> an alter table and "changing" an INTEGER field to be INTEGER.
> Postgres does not optimize that do a no-op, so you get the re-writing
> effect.

How does table rewriting work? Does it happen a row at a time or all at once?

In other words, how much free disk space is needed on an 800 TB filesystem
to rewrite a 550 TB table? (Have I got enough space?)

Aleksey

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2012-03-15 02:32:36 Did xpath_table get dropped.
Previous Message Scott Marlowe 2012-03-15 01:46:49 Re: copy in date string "00-00-00 00:00:00"