Re: CLUSTER FREEZE - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: CLUSTER FREEZE
Date
Msg-id CAA4eK1LGZLFvYpwszcLWg1aJcMUVu67rdLoAu6b0kAtPgPKeQg@mail.gmail.com
Whole thread Raw
In response to CLUSTER FREEZE  (Thomas Munro <munro@ip9.org>)
Responses Re: CLUSTER FREEZE
Re: CLUSTER FREEZE
Re: CLUSTER FREEZE
List pgsql-hackers
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?

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

CLUSTER opt_freeze opt_verbose qualified_name cluster_index_specification
 { ClusterStmt *n = makeNode(ClusterStmt);
- n->relation = $3;
- n->indexname = $4;
- n->verbose = $2;
+ n->relation = $4;
+ n->freeze_min_age = $2 ? 0 : -1;
+ n->indexname = $5;
+ n->verbose = $3;
..

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: How should RLS treat ON DELETE CASCADE, ON UPDATE CASCADE, and ON DELETE SET NULL?
Next
From: Abhijit Menon-Sen
Date:
Subject: [PATCH] Use MAP_HUGETLB where supported (v3)