mojolicious / mojo-pg

Mojolicious :heart: PostgreSQL
https://metacpan.org/release/Mojo-Pg
Artistic License 2.0
99 stars 46 forks source link

warn about using connect_cached #34

Closed wrog closed 7 years ago

wrog commented 7 years ago

Summary

warn not to do { dbi_connect_method => connect_cached } in Mojo::Pg parameters

Motivation

I believe this is otherwise a common thing to do in website/DBI situations, and thus someone copying in miscellaneous DBI parameters from their non-Mojo implementation without thinking about it could get hosed with difficult-to-find errors if they're expecting transaction/asynchronous stuff to work right.

Current doc is clear that there's some kind of caching going on somewhere in Mojo::Pg but without looking at the code, there's no knowing whether the lack of mention is, say, because Mojo::Pg is able to accomodate either setting (when it's not).

References

none

kraih commented 7 years ago

I don't think this warning is necessary yet, and if this ever becomes a more common problem, the warning should at least be a little more precise. I especially don't like "cause confusion".