Hi all, our RudderStack pg database is steadily fi...
# support
d
Hi all, our RudderStack pg database is steadily filling up over time despite our data plane being healthy and all events successfully being delivered to destinations. It appears that the the culprits are the
wh_*
tables like
wh_load_files
. We have a ClickHouse destination (again, healthy and receiving all events) and the contents of these
wh_*
tables (I'm guessing "wh" is for "WareHouse") seems to be related to that, but I can't find documentation anywhere. Should we expect these tables to grow without bound? Will they be cleaned up automatically? Is that something we can configure or do ourselves safely? Thanks in advance for any advice!
m
Hey There! 👋 Your message has been received by the RudderStack team. We will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
d
To start to answer my question, yes the
wh_
tables are related to Warehouses: https://www.rudderstack.com/docs/user-guides/administrators-guide/config-parameters/#warehouse. The configuration parameters listed there do not mention anything about cleanup/retention though.
h
Can you tell me which table has the biggest size? All of these contains historical metadata for debugging purposes. We do have an archival policy too for the entries in these tables but you can feel free to drop all the columns older than a week or month if the data isn’t needed by you
d
wh_load_files
accounts for ~50% of the database
wh_staging_files
is ~25%
those are the two main culprits
What is the archival policy? Is there a way for me to configure that? I also found some mention of an undocumented
RSERVER_WAREHOUSE_ARCHIVE_UPLOAD_RELATED_RECORDS
env variable... would setting that to either true or false help reduce disk usage?
a
RSERVER_WAREHOUSE_ARCHIVE_UPLOAD_RELATED_RECORDS
is by default set to true. So we don’t need any changes here.