WOW! Turns out the issue we were experiencing on prod couldn't be reproduced on test because I had named the database the same name as the postgres user, which the production db doesn't have, after changing that, I was able to easily reproduce the problem and fix it