Re: CLUSTER FREEZE

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: CLUSTER FREEZE
Дата
Msg-id CADLWmXW+CDrvc++oFgJ14iAp=4PvBQkZWGNJxnhzwe20TuQspg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: CLUSTER FREEZE  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: CLUSTER FREEZE  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On 24 October 2013 05:58, Amit Kapila <amit.kapila16@gmail.com> wrote:
On Thu, Oct 24, 2013 at 4:58 AM, Thomas Munro <munro@ip9.org> wrote:
> Hi
> I noticed that CLUSTER doesn't have a FREEZE option.  Here is a patch to add
> that, for consistency with VACUUM.  Is it useful?

I wonder why anyone would like to freeze during CLUSTER command when
they already have separate way (VACUUM FREEZE) to achieve it, do you
know or can think of any case where user wants to do it along with
Cluster command?

As others have said, the goal is to freeze and cluster in a single step.  You can already do that if you know how things work under the covers with:

SET vacuum_freeze_min_age = 0;
CLUSTER my_table;

This patch lets you say CLUSTER FREEZE instead.  It mirrors VACUUM, which can freeze tuples based on the GUC and tuple age or the FREEZE keyword.
 
Anyway code side, I think you need to set both feeze_min_age as well
as freeze_table_age, see VACUUM command in gram.y
 
Ok, I attach a new version that is more like VACUUM in gram.y.  (Although I'm not sure why it isn't a single boolean flag).

Thanks,
Thomas Munro
Вложения

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Location for external scripts for Extensions?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: CLUSTER FREEZE