https://prefect.io logo
Title
v

Vipul

11/27/2020, 9:19 AM
Hi All, quick question, is there any quick way to remove all the metadata and log information from Postgres db after 30 days? Thanks
j

Jeremiah

11/27/2020, 3:31 PM
Hi @Vipul - there’s no automatic functionality in Prefect Server to discard old today, but you could run a delete against the database yourself. All tables have cascades set up, so deleting (for example) a flow run will remove all associated task runs and logs.
v

Vipul

11/27/2020, 3:32 PM
Thanks @Jeremiah but what if I don't want to remove flow but just remove the old logs...do I need to manually do this
j

Jeremiah

11/27/2020, 3:32 PM
Yes, you can run a delete against the log table
v

Vipul

11/27/2020, 3:52 PM
Thanks