I'm wondering, what version of postgres? What is the vacuum regime like? Is autovacuum running? Is it keeping up with updates? How large the table(s) /partitions?
What is the hardware like? how much memory is there? How much is available to postgres?
If it turns out that the lack of performance is indeed due to the database, you may be better off posting on pgsql-performance@postgresql.org
(make sure you include pertinent detail, mainly postgresql.conf settings, basic hardware data, load characteristics etc).
Btw, vacuuming is necessary, but be careful with VACUUM FULL: it's slow and needs a table lock (normal VACUUM doesn't).