We are currently facing OSP0005-2 events (PostgreSQL DB going into recovery mode).
From PDC analysis, we identified a few UDF-based reports and optimized the top ones causing the issue. This provided temporary relief. However, when users navigate through different paths, other reports are getting triggered and the issue reoccurs.
While optimizing all UDF reports seems to be the right long-term approach, we have a large number of such reports and it will take time. Also, this issue has only started occurring in the last couple of days.
For the short term, is there anything we can do to prevent the DB from going into recovery/failure state when such reports are triggered?