We're a small SaaS startup (~10 person team; mostly engineers).
We use Postgres on AWS and GCP in production.
We have signed contracts with some customers that prohibit us from giving full production access to developers (to avoid security concerns). I think this is a good thing.
However, every now and then our backend team needs access to the database to analyze data, table records, and see how things are working.
What are some recommended best practices for this?
At some larger companies, they have internal tooling that gives developers access to a middleman CLI through which they can run SQL queries. This middleman logs these for auditing purposes.