Re: Built-in connection pooler

From: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
To: "ideriha(dot)takeshi(at)fujitsu(dot)com" <ideriha(dot)takeshi(at)fujitsu(dot)com>
Cc: Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Ryan Lambert <ryan(at)rustprooflabs(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>, Dimitri Fontaine <dim(at)tapoueh(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: Built-in connection pooler
Date: 2019-11-14 07:06:23
Message-ID: b5ff3ff2-b75c-c518-f75e-a472fa5292cc@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> For now I replay for the above. Oh sorry, I was wrong about the condition.
> The error occurred under following condition.
> - port = 32768
> - proxy_port = 6543
> - $ psql postgres -p 6543
>
> $ bin/pg_ctl start -D data
> waiting for server to start....
> LOG: starting PostgreSQL 13devel on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28), 64-bit
> LOG: listening on IPv6 address "::1", port 6543
> LOG: listening on IPv4 address "127.0.0.1", port 6543
> LOG: listening on IPv6 address "::1", port 32768
> LOG: listening on IPv4 address "127.0.0.1", port 32768
> LOG: listening on Unix socket "/tmp/.s.PGSQL.6543"
> LOG: listening on Unix socket "/tmp/.s.PGSQL.32768"
> LOG: Start proxy process 25374
> LOG: Start proxy process 25375
> LOG: database system was shut down at 2019-11-12 16:49:20 JST
> LOG: database system is ready to accept connections
>
> server started
> [postgres(at)vm-7kfq-coreban connection-pooling]$ psql -p 6543
> LOG: Message size 84
> WARNING: could not setup local connect to server
> DETAIL: invalid port number: "-32768"
> LOG: Handshake response will be sent to the client later when backed is assigned
> psql: error: could not connect to server: invalid port number: "-32768"
>
> By the way, the patch has some small conflicts against master.

Thank you very much for reporting the problem.
It was caused by using pg_itoa for string representation of port (I
could not imagine that unlike standard itoa it accepts int16 parameter
instead of int).
Attached please find rebased patch with this bug fixed.

--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
builtin_connection_proxy-26.patch text/x-patch 135.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-11-14 07:50:18 Re: [PATCH] Do not use StdRdOptions in Access Methods
Previous Message Pavel Stehule 2019-11-14 06:55:01 Re: dropdb --force