S
Supabase5mo ago
jacob

Api call & cron job is part of datbase ?

i am calling api every 30 seconds and saving response in database now it is using over 300mbs of data so network call and cron job is accounted as part of database ?
No description
1 Reply
garyaustin
garyaustin5mo ago
Pg_net and cron are Postgres extensions so yes they are part of the database. You should use a cron task to clean the job_run_details table occasionally as called out in the extensions repository.
https://github.com/citusdata/pg_cron?tab=readme-ov-file#viewing-job-run-details Pg_net I thought would trim the response table every few hours. 30 seconds is very aggressive for a cron task in Postgres and doing pg_net. Looks like the default is 6 hours for life a a pg_net response in that table. I assume Supabase uses the default.

Did you find this page helpful?