Re: Built-in connection pooler - Mailing list pgsql-hackers
From | Konstantin Knizhnik |
---|---|
Subject | Re: Built-in connection pooler |
Date | |
Msg-id | 07d907ec-99f6-af2c-02a0-0447f82b8f5c@postgrespro.ru Whole thread Raw |
In response to | Re: Built-in connection pooler (Jaime Casanova <jaime.casanova@2ndquadrant.com>) |
List | pgsql-hackers |
Thank your for your help. On 05.07.2020 07:17, Jaime Casanova wrote: > You should also allow cursors without the WITH HOLD option or there is > something i'm missing? Yes, good point. > a few questions about tainted backends: > - why the use of check_primary_key() and check_foreign_key() in > contrib/spi/refint.c make the backend tainted? I think this is because without it contrib test is not passed with connection pooler. This extension uses static variables which are assumed to be session specific but in case f connection pooler are shared by all backends. > - the comment in src/backend/commands/sequence.c needs some fixes, it > seems just quickly typed Sorry, done. > > some usability problem: > - i compiled this on a debian machine with "--enable-debug > --enable-cassert --with-pgport=54313", so nothing fancy > - then make, make install, and initdb: so far so good > > configuration: > listen_addresses = '*' > connection_proxies = 20 > > and i got this: > > """ > jcasanov@DangerBox:/opt/var/pgdg/14dev$ /opt/var/pgdg/14dev/bin/psql > -h 127.0.0.1 -p 6543 postgres > psql: error: could not connect to server: no se pudo conectar con el > servidor: No existe el fichero o el directorio > ¿Está el servidor en ejecución localmente y aceptando > conexiones en el socket de dominio Unix «/var/run/postgresql/.s.PGSQL.54313»? > """ > > but connect at the postgres port works well > """ > jcasanov@DangerBox:/opt/var/pgdg/14dev$ /opt/var/pgdg/14dev/bin/psql > -h 127.0.0.1 -p 54313 postgres > psql (14devel) > Type "help" for help. > > postgres=# \q > jcasanov@DangerBox:/opt/var/pgdg/14dev$ /opt/var/pgdg/14dev/bin/psql > -p 54313 postgres > psql (14devel) > Type "help" for help. > > postgres=# > """ > > PS: unix_socket_directories is setted at /tmp and because i'm not > doing this with postgres user i can use /var/run/postgresql > Looks like for some reasons your Postgres was not configured to accept TCP connection. It accepts only local connections through Unix sockets. But pooler is not listening unix sockets because there is absolutely no sense in pooling local connections. I have done the same steps as you and have no problem to access pooler: knizhnik@xps:~/postgresql.vanilla$ psql postgres -h 127.0.0.1 -p 6543 psql (14devel) Type "help" for help. postgres=# \q Please notice that if I specify some unexisted port, then I get error message which is different with yours: knizhnik@xps:~/postgresql.vanilla$ psql postgres -h 127.0.0.1 -p 65433 psql: error: could not connect to server: could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 65433? So Postgres is not mentioning unix socket path in this case. It makes me think that your server is not accepting TCP connections at all (despite to listen_addresses = '*' )
pgsql-hackers by date: