Re: BUG #17391: While using --with-ssl=openssl and PG_TEST_EXTRA='ssl' options, SSL tests fail on OpenBSD 7.0

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Daniel Gustafsson <daniel@yesql.se>, Thomas Munro <thomas.munro@gmail.com>, byavuz81@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>, Heikki Linnakangas <heikki.linnakangas@iki.fi>, Michael Paquier <michael@paquier.xyz>
Date: 2022-02-15T00:41:43Z
Lists: pgsql-bugs
Hi,

On 2022-02-12 16:56:38 -0500, Tom Lane wrote:
> I went ahead and pushed the patches-under-discussion (the larger
> one only to HEAD, for now).

I was just writing a test to verify that the slot / stats bug you just
encountered is / stays fixed. I ended up doing it in isolationtester, because
that was the easiest to get reliable. When terminating an isolationtester
connection, I see the FATAL twice in isolationtester output:

  step s2_init: SELECT 'init' FROM pg_create_logical_replication_slot('slot_create_error', 'test_decoding'); <waiting ...>
  step s1_terminate_s2:
      SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE application_name = 'isolation/error/s2';

  pg_terminate_backend
  --------------------
  t
  (1 row)

  step s2_init: <... completed>
  FATAL:  terminating connection due to administrator command
  FATAL:  terminating connection due to administrator command
  server closed the connection unexpectedly
          This probably means the server terminated abnormally
          before or while processing the request.

I haven't yet tracked down whether that's related to these changes, but I
thought it was interesting enough to bring up...

Greetings,

Andres Freund



Commits

  1. Move libpq's write_failed mechanism down to pqsecure_raw_write().

  2. Fix thinko in PQisBusy().

  3. Set SNI ClientHello extension to localhost in tests

  4. Improve worst-case performance of text_position_get_match_pos()