From: | Steve Crawford <scrawford(at)pinpointresearch(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, paul rivers <rivers(dot)paul(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: postgre vs MySQL |
Date: | 2008-03-14 15:43:26 |
Message-ID: | 47DA9D1E.4020803@pinpointresearch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Alvaro Herrera wrote:
>
>
> You can use CLUSTER reliably only from 7.2 upwards. (Or was it 7.3? I
> forget). In earlier versions it would lose information about other
> indexes (i.e. those not being clustered on), foreign keys, inheritance,
> etc; in other words pretty much a disaster except for the simplest of
> tables.
Interesting historical note, but fortunately largely irrelevant these days.
> Also, it is MVCC-safe only from 8.3 upwards; on older versions
> it (incorrectly) deletes dead tuples that are still visible to old
> transactions.
>
>
More interesting. I may have a broken mental-model. I *thought* that
CLUSTER acquired exclusive locks and that acquisition of the exclusive
lock would imply that there couldn't be any transactions accessing that
table. Where is my misunderstanding?
> Of course, the main problem with CLUSTER is that it needs about 2x the
> disk space of table + indexes.
>
Again checking my mental model. My understanding is that CLUSTER
basically recreates the tables and indexes and then swaps the new ones
in place of the originals. So ~2x is true for typical tables. But for
tables badly bloated by multiple bulk updates or bad vacuum practices
CLUSTER should require far less than 2x.
Cheers,
Steve
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-03-14 15:49:48 | Re: pgbench not setting scale size correctly? |
Previous Message | Sam Mason | 2008-03-14 15:39:55 | Re: postgre vs MySQL |