We do this in discourse-data-explorer and I think it totally makes sense to have the same guard in our reports to prevent any mistake and future usage.
You’ve signed the CLA, jjaffeux. Thank you! This pull request is ready for review.
Seems like a good and safe change to make!
Looks safe to me, the thing to watch for is pgbouncer but since you are in a transaction already we are good!