|From:||Maxim Orlov <m(dot)orlov(at)postgrespro(dot)ru>|
|To:||Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>|
|Subject:||Re: SSL negotiation error on massive connect/disconnect|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
On 2021-03-01 17:22, Maxim Orlov wrote:
> I have primary server on port 55942 and two standbys on 55943 and
> 55944. Then use connection string like
> to connect to the servers via psql.
> Everything works perfectly no matter how many attempts to connect I do.
> But when I stop primary server, very rarely I do get an error
> "received invalid response to SSL negotiation" from psql. I got this
> error when I tried to make massive connects/disconnects test and it's
> unlikely to reproduce manually without thousands of connections
> sequentially with no intentional delay in between.
> The problem present only on Linux, MacOS works fine.
> As far as I understand this particular problem is because of
> postgresql gets "zero" (i.e. 0) byte in SSLok in
> PQconnectPoll(at)src/interfaces/libpq/fe-connect.c. This lead to select
> "else" branch with described error message. This may be fixed by
> handling zero byte as 'E' byte. But I'm not sure if it's good
> solution, since I don't know why fe-connect gets an zero byte at all.
> I consider it's worth to correct this. This error is rare but it's
> really odd to notice this unexpected and wrong behavior.
> Best regards,
> Maxim Orlov.
Correction. Previous patch was wrong. The proper one is here.
|Next Message||Magnus Hagander||2021-04-09 11:12:33||Re: Small typo in guc.c|
|Previous Message||Michael Paquier||2021-04-09 10:51:25||Re: psql - add SHOW_ALL_RESULTS option|