I am using pg-pool via the node-postgres driver, and noticed something interesting. On a MAC, I was using the driver in an electron app, and postgres was running locally via PostgresApp. In the electron app, if I didn't pass in any credentials , the connection would still succeed. How odd! When I looked at the pool object, it had my default username (MAC username) running the postgres instance and that was being passed into the connection.
If you need further explanation, please let me know. This is the best way I know how to describe it so far.
My question is this- How does pg-pool know to gather the default user account running the postgres service on my local computer?
I am using pg-pool via the node-postgres driver, and noticed something interesting. On a MAC, I was using the driver in an electron app, and postgres was running locally via PostgresApp. In the electron app, if I didn't pass in any credentials , the connection would still succeed. How odd! When I looked at the pool object, it had my default username (MAC username) running the postgres instance and that was being passed into the connection.
If you need further explanation, please let me know. This is the best way I know how to describe it so far.
My question is this- How does pg-pool know to gather the default user account running the postgres service on my local computer?