| From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
|---|---|
| To: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
| Cc: | Pgsql Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Noah Misch <noah(at)leadboat(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Subject: | Re: Serverside SNI support in libpq |
| Date: | 2026-09-22 21:55:36 |
| Message-ID: | D015F102-C458-42F6-8787-E3D9F2B17A69@yesql.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On 22 Sep 2026, at 12:19, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> wrote:
>
> + /*
> + * If the initialization failed, and the ssl_sni setting was changed, we
> + * need to revert ssl_sni back to the previous setting to match the SSL
> + * configuration left in place. Log a WARNING to alert the user.
> + */
> + if (SSL_hosts->sni_enabled != ssl_sni)
> + {
>
> Won't this cause a different crash without a null check for SSL_hosts?
Yeah, I overlooked that case and missed subjecting to LLM review as CoPilot
immediately complained about that as well. Should've had coffee before
emailing.
> Also, this seems to be a partial revert only affecting new sessions,
> still leaving existing sessions with an incorrect value, that won't be
> confusing?
In the v3 the ssl_sni value isn't reverted at all, which albeit confusing is in
line with how we treat (and document) SSL configuration so I think thats the
better option. Flipping it in existing sessions would require a lot more
infrastructure for little gain.
--
Daniel Gustafsson
| Attachment | Content-Type | Size |
|---|---|---|
| v3-0001-Keep-current-ssl_sni-setting-on-SSL-config-reload.patch | application/octet-stream | 7.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Devrim Gündüz | 2026-09-22 22:05:12 | [PATCH] Misleading error message for REPACK USING INDEX on shared catalogs |
| Previous Message | Manu | 2026-09-22 21:50:23 | Re: Make COPY format extendable: Extract COPY TO format implementations |