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

Re: CLUSTER and synchronized scans and pg_dump et al

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: Steve Atkins <steve(at)blighty(dot)com>
Cc: pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: CLUSTER and synchronized scans and pg_dump et al
Date: 2008-01-28 19:26:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Steve Atkins wrote:
> On Jan 28, 2008, at 8:36 AM, Tom Lane wrote:
>> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>> Kevin Grittner wrote:
>>>> It would seem reasonable to me for pg_dump to use ORDER BY to select
>>>> data from clustered tables.
>>> What will be the performance hit from doing that?
>> That worries me too.  Also, in general pg_dump's charter is to reproduce
>> the state of the database as best it can, not to "improve" it.
> One common use of cluster around here is to act as a faster version
> of vacuum full when there's a lot of dead rows in a table. There's no
> intent to keep the table clustered on that index, and the cluster flag
> isn't removed with alter table (why bother, the only thing it affects is
> the cluster command).
> I'm guessing that's not unusual, and it'd lead to sorting tables as part
> of pg_dump.

I've done that too - and every time I typed that "CLUSTER ... " I 
thought why, oh why isn't there something like REWRITE TABLE <table>", 
which would work just like CLUSTER, but without the sorting ;-) Maybe 
something to put on the TODO list...

We might even call it "VACCUM REWRITE" ;-)

regards, Florian Pflug

In response to

pgsql-hackers by date

Next:From: Greg Sabino MullaneDate: 2008-01-28 19:55:22
Subject: Re: [PATCHES] Friendly help for psql
Previous:From: Bruce MomjianDate: 2008-01-28 19:12:51
Subject: Re: [PATCHES] Friendly help for psql

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