Exploring and Experimenting Safely in Production
Most companies have a pre-production or staging environment that runs the application with a separate PostgreSQL database.
A staging environment is a great place to perform some kinds of experimentation. Take advantage of this if it’s available to you! This is a much better place to perform structural modifications or load large amounts of data, because it doesn’t add risk to the availability or operation of your production database.
To further reduce risk, create a read-only PostgreSQL user that you can use on your primary database. Grant the pg_read_all_data (14+) or the pg_monitor role to this user so that the role can access new tables. The post, “Creating a Read-Only Postgres User,”[63] ...
Get High Performance PostgreSQL for Rails now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.