Just a friendly FYI that AWS do not have access to any of your PostgreSQL RDS database logs, such as postgresql.log. This is important, if you just happen to hit PostgreSQL bug such as this one that was fixed in v11.3:
- Fix race conditions in management of dynamic shared memory (Thomas Munro)
These could lead to “dsa_area could not attach to segment” or “cannot unpin a segment that is not pinned” errors.
Once this problem occurs, your RDS database will appear to be running, and can possibly be used to service some queries… but most queries will hang, and eventually your application servers will timeout causing application downtime.
Unfortunately from the AWS support perspective, the RDS database is up, it’s using some CPU, and network, so there’s no reason to suspect it’s not healthy. It’s only if you see this message in postgresql.log that you will know what the problem is:
2018-01-01 12:34:56 UTC::@:[10234]:FATAL: cannot unpin a segment that is not pinned
So if you run an application team, then please ensure you have a DBA somewhere on staff, because AWS doesn’t have your back when you hit problems such as this.