Onpremise Retool PostgreSQL size

Hello
I reopen one topic again because I still have the same problem where the tables audit_trail_events and page_saves are too big. We are running version 3.148.0-stable on prem. I will like to know if in more recent version this problem doesnt happen?

schema_name | table_name | total_size
-------------+--------------------+------------
public | audit_trail_events | 7180 MB
public | page_saves | 27 GB

Hi @Jorge !

Sorry to hear that you are still dealing with this issue. Unfortunately, there is no built-in retention setting for the data, so you have to prune/manage your data manually.

  • audit_trail_events can generally be deleted safely since it is just historical logging of user actions.
  • page_saves : you can join on the tags/releases table so you don't delete saves tied to a release you might need to roll back to.
  • If you're on the Enterprise plan, you can stream audit events out to Datadog/Splunk (via LOG_AUDIT_EVENTS/HEC) and then deleting the local table.

The most recent on-prem version does not address this retention functionality at the moment, but I will add your request to our internal feature request to consider for the future!

In the meantime, were you able to try the recommendations in your previous thread here?

-Jen

Hi @Jorge ! Just checking back with you to see if you still need assistance with this issue!

-Jen

Hello Jen
So if we focus on the page_saves table, there is no built in option to clean up this table? Do we have to mangae it with SQL queries?
We've seen this is a problem in our self host env and it will continue increasing

Hi @Jorge!

There is no UI option to clean up page_saves table on on-prem, but you can run the built-in script in the backend (available for self-hosted 3.178+):

./retool_backend --run-pagesave-compaction

I would also like to mention that Alice from Retool Support team has created this post about reducing your Retool database size that might be helpful:

Hope this helps! Let me know if you need anything else at this time :slight_smile:

-Jen