Docs: Add note for Cloud customers

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/11112
GitOrigin-RevId: 6418d09402083201616d50f06d2d6bb36c251c32
This commit is contained in:
Rob Dominguez 2024-12-11 07:03:54 -06:00 committed by hasura-bot
parent 8401c25ff1
commit e63ea27749

View File

@ -14,18 +14,21 @@ keywords:
## Introduction ## Introduction
Hasura stores action logs of [async Actions](/actions/async-actions.mdx) in a table Hasura stores action logs of [async Actions](/actions/async-actions.mdx) in a table in **the "hdb_catalog" schema of the
in **the "hdb_catalog" schema of the Hasura Metadata database**. Hasura Metadata database**.
As the table gets larger, you may want to prune it. You can use any of the following options to prune your logs depending on As the table gets larger, you may want to prune it. You can use any of the following options to prune your logs
your need. depending on your need.
:::caution Warning :::caution Warning
- Deleting logs is irreversible, so be careful with these Actions. - Deleting logs is irreversible, so be careful with these Actions.
- Deleting logs while subscriptions for the response might still be - Deleting logs while subscriptions for the response might still be open may result into the loss of data and `null`
open may result into the loss of data and `null` values been values been returned.
returned.
The steps described below are only accessible for self-hosted EE customers. For Cloud customers,
[please reach out to support](https://support.hasura.io/hc/en-us/requests/new) for help in cleaning up async Action
logs.
::: :::
@ -55,8 +58,8 @@ DELETE FROM hdb_catalog.hdb_action_log;
## Clearing data before a particular time period ## Clearing data before a particular time period
If you wish to keep recent data and only clear data before a particular time period If you wish to keep recent data and only clear data before a particular time period you can add the following time
you can add the following time clause to your query's where clause: clause to your query's where clause:
```sql ```sql
-- units can be 'minutes', 'hours', 'days', 'months', 'years' -- units can be 'minutes', 'hours', 'days', 'months', 'years'
@ -69,10 +72,12 @@ For example: to delete all logs older than 3 months:
DELETE FROM hdb_catalog.hdb_action_log WHERE created_at < NOW() - INTERVAL '3 months'; DELETE FROM hdb_catalog.hdb_action_log WHERE created_at < NOW() - INTERVAL '3 months';
``` ```
See the [Postgres date/time functions](https://www.postgresql.org/docs/current/functions-datetime.html) for more details. See the [Postgres date/time functions](https://www.postgresql.org/docs/current/functions-datetime.html) for more
details.
:::info Additional Resources :::info Additional Resources
Introduction to Hasura Actions - [View Recording](https://hasura.io/events/webinar/hasura-actions/?pg=docs&plcmt=body&cta=view-recording&tech=). Introduction to Hasura Actions -
[View Recording](https://hasura.io/events/webinar/hasura-actions/?pg=docs&plcmt=body&cta=view-recording&tech=).
::: :::