I am actually facing a similar problem. I also find that Rails just creates a db connection everytime I do Model.new even though I have not yet saved it.
This is because active record models learn their attributes by querying the database scheme. I haven’t tried it but there appears to be a way to cache this information in the local file system which would likely avoid the early dB connect if you really needed to do that. Also avoids querying the scheme on processs boot entirely if you are willing to trust the cached scheme matches the. database scheme. See https://github.com/rails/rails/issues/24133 for discussion