Hello community!
The following problem occurs:
I’m using Supabase and connecting to it via a Postgres node. In recent days, such an error began to appear in response to SQL queries: “remaining connection slots are reserved for non-replication superuser connections”.
As I was able to figure out, the reason is related to the use of PGbouncer and the mode setting.
Maybe someone from the community or the n8n team came across this error and was able to solve it?
The number of active connections is always 1, I did tests and could not get more than 2 active connections at one time.
Is this a self hosted instance of Postgres and Supabase or is it the cloud version? When connecting to the database are you also using the normal connection string under Settings > Database > Connection Info or the Database Pooling connection info from Settings > Database > Connection Pooling?
@Jon can you make an example of the connection pooling in n8n workflow? So, I understand that this should be done not through the standard settings of the credIntals in the Postgres node, but somehow differently?
When I have it a go this morning I just setup up the Postgres credentials to use the host and port from the pooling option and just used the node as normal. Did this not work for you?
I used the “host” value from the normal connection and “port” from the pooling connection. In fact, I only changed the port number. Now everything works. Is this the correct setting?