Open kputh opened 2 years ago
@kputh Postgrator just calls the execQuery
to do everything with latest version. I wondered if something was funky with the this
context of things, but I don't understand why it'd work in some environments and not others.
Is there anything in your migrations that reference the role kaiputh
?
Hi, we've been using Postgrator for a while now, and ran into a bug after a recent upgrade. This is a simplified version of the function we run:
I run this code on/with
and get the following output:
For some reason, this error only occures during development, and neither in our automated tests nor on the server. It's unclear to me what triggers it.
I modified the code to make it easy to reproduce and debug the issue. As far as I can tell, the connection to the Postgres server works as it should. I can change the role name in the error message by setting the environment variable
PGUSER
(see pg documentation). It seems like some part or dependency of Postgrator is trying to open a separate database connection with the default values of pg. Is this a bug in Postgrator?