From: | "Dawid Kuroczko" <qnex42(at)gmail(dot)com> |
---|---|
To: | "Kevin Kempter" <kevin(at)kevinkempterllc(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: SQL Diff ? |
Date: | 2007-08-26 14:02:02 |
Message-ID: | 758d5e7f0708260702w61cdce5awd295897efb97d672@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 8/26/07, Kevin Kempter <kevin(at)kevinkempterllc(dot)com> wrote:
> On Saturday 25 August 2007 21:10:19 Ron Johnson wrote:
> > On 08/25/07 21:51, Kevin Kempter wrote:
> > > Hi List;
> > >
> > > I have a very large table (52million rows) - I'm creating a copy of it to
> > > rid it of 35G worth of dead space, then I'll do a sync, drop the original
> > > table and rename table2.
> >
> > What is your definition of "dead space"?
> >
> > Bad rows, duplicate rows, old rows? Something else?
>
> deleted rows that should have been cleaned up with vacuum, problem is the
> client let it go so long that now I cant get a vacuum to finish cause it
> impacts the day2day operations too much. Long story, see my recent questions
> on the performance list for more info.
In your place I would do something like Slony-I does, when
it replicates the tables. Create on insert/update/delete triggers
on table1 which will log operations on table1 to some table1_log
table. Then copy table1 to table2. Then replay table1_log on
table2, then BEGIN;LOCK tablel1;finish replaying the lock;DROP table1;
alter table rename...;commit;
Or perhaps actually use Slony-I for the above steps? Should work
quite nicely... Or perhaps use SkyTools for it (I've never used it)?
Regarda,
Dawid
From | Date | Subject | |
---|---|---|---|
Next Message | Trevor Talbot | 2007-08-26 15:06:52 | Re: FATAL: could not reattach to shared memory (Win32) |
Previous Message | Bill Moran | 2007-08-26 13:44:45 | Re: Geographic High-Availability/Replication |