PostgreSQL High CPU Usage Issue on ODK Central

The blobs are written to the DB first and then removed when they are migrated to S3. Those inserts/deletes generate WALs. So too do vacuums (including autovacuums to clean up the dirty data in heap pages.

Try setting up a test environment and experiment with tweaking checkpoint frequency, enabling WAL compression, or using UNLOGGED on the blobs table.

Related: Proposal: better large attachments handling via presigned upload urls for S3 - #3 by LN