Re:Things I wished more developers knew about databases
by hermitdev on Wednesday April 22, 2020 @05:23PM
(#22950336)
At a previous employer, I was forced to use a certain 3rd party ODBC library. Under certain circumstances, it would just do `exit(1)`, with nothing even to stderr. Very frustrating and annoying to debug/fix. Had I physically known the developer responsible for that behavior, I'd probably have faced murder charges and plead temporary insanity.
Re:Things I wished more developers knew about databases
by seanc on Thursday April 23, 2020 @09:37AM
(#22955799)
"Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live.
I usually maintain my own code, so the as-if is true. "
Re:Things I wished more developers knew about databases
by Amanzel on Saturday April 25, 2020 @05:02AM
(#22976756)
Lol
Re:Things I wished more developers knew about databases
by randomdata on Wednesday April 22, 2020 @02:54PM
(#22948926)
The database/sql package isn’t very magical. The comment about magical library makes
me think it was some other package.
Re:Things I wished more developers knew about databases
by bregma on Thursday April 23, 2020 @08:23AM
(#22955156)
Any sufficiently advanced technology is indistinguishable from magic. If your source of knowledge is stack overflow or a youtube video posted on linkedin you already live in a world filled with magic.
Re:Things I wished more developers knew about databases
by justinclift on Friday April 24, 2020 @04:24AM
(#22965794)
They may have been using one of the PG specific Go libraries instead too. eg https://github.com/jackc/pgx
My wild guess would be that the Go code never closed the result/rows which caused either a pool exhaustion / left the connections hanging and eventually got a timeout. Consider this similar to how http client's need to close the response.Body or else connections can't be reused.