> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify-poc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# remove_columnstore_policy()

> Remove a columnstore policy from a hypertable

export const CAGG = 'continuous aggregate';

export const HYPERTABLE = 'hypertable';

export const CHUNK = 'chunk';

export const COLUMNSTORE = 'columnstore';

<Icon icon="tag" iconType="duotone" /> Since [2.18.0][tsdb-2.18.0]

<Tag>Community</Tag>

<Info>
  `remove_columnstore_policy()` replaces `remove_compression_policy()`, deprecated in 2.18.0. The parameters are the same.
</Info>

Remove a {COLUMNSTORE} policy from a {HYPERTABLE} or {CAGG}.

To restart automatic {CHUNK} migration to the {COLUMNSTORE}, you need to call
[add\_columnstore\_policy][add_columnstore_policy] again.

## Samples

You see the {COLUMNSTORE} policies in the [informational views][informational-views].

* **Remove the {COLUMNSTORE} policy from the `cpu` table**:

  ```sql theme={"dark"}
  CALL remove_columnstore_policy('cpu');
  ```

* **Remove the {COLUMNSTORE} policy from the `cpu_weekly` {CAGG}**:

  ```sql theme={"dark"}
  CALL remove_columnstore_policy('cpu_weekly');
  ```

## Arguments

The syntax is:

```sql theme={"dark"}
CALL remove_columnstore_policy(
    hypertable = '<hypertable_name>',
    if_exists = true | false
);
```

| Name         | Type     | Default | Required | Description                                                                                                                  |
| ------------ | -------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `hypertable` | REGCLASS | -       | ✔        | Name of the {HYPERTABLE} or {CAGG} to remove the policy from                                                                 |
| `if_exists`  | BOOLEAN  | `false` | ✖        | Set to `true` so this job fails with a warning rather than an error if a {COLUMNSTORE} policy does not exist on `hypertable` |

## Returns

This function returns void.

[add_columnstore_policy]: /api-reference/timescaledb/hypercore/add_columnstore_policy

[informational-views]: /api-reference/timescaledb/informational-views/jobs

[tsdb-2.18.0]: https://github.com/timescale/timescaledb/releases/tag/2.18.0
