Re: postgre vs MySQL

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Re: postgre vs MySQL
Дата
Msg-id 47DA9D1E.4020803@pinpointresearch.com
обсуждение исходный текст
Ответ на Re: postgre vs MySQL  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: postgre vs MySQL
Re: postgre vs MySQL
Re: postgre vs MySQL
Список 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


В списке pgsql-general по дате отправления:

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: postgre vs MySQL
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgbench not setting scale size correctly?