Re: Back Port Request for INVALID Startup Packet

Поиск
Список
Период
Сортировка
От Fabio Ugo Venchiarutti
Тема Re: Back Port Request for INVALID Startup Packet
Дата
Msg-id 3aba09f2-6892-570e-1499-609898657719@ocado.com
обсуждение исходный текст
Ответ на Re: Back Port Request for INVALID Startup Packet  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 12/03/2020 00:29, Tom Lane wrote:
> Virendra Kumar <viru_7683@yahoo.com> writes:
>> Can you please back port patch where if a 0 byte packet sent to PG instance (Health Checks), it starts complaining
aboutinvalid startup packet and flood the log which increases log size considerably if the health checks are every 3
secondsor something like that. 
>> Patch Requested - https://git.postgresql.org/gitweb/?p=postgresql.git;a=patch;h=342cb650e
>
> We generally don't like to change behavior of back branches without
> ironclad agreement that the existing behavior is a bug ... which this
> surely isn't.  Also, the discussion leading up to that patch specifically
> considered and rejected back-patching; so I'm disinclined to overrule
> that decision now.
>
> I would suggest that an every-three-second health check is not
> appropriate, especially one that is so minimal that it only
> detects whether the postmaster is alive.


Does the backend explicitly configure the kernel's TCP accept queue?

Unless Postgres sets it to impractically low numbers, the above test
sounds weak from yet another angle; the postmaster might be "alive" as a
process but completely seized for other reasons: at least in Linux the
TCP accept queue progresses the 3-way handshake so long as the bound
socket's file descriptor is still held, without even waiting for accept().


I'd recommend a better probe that at least sends a startup message and
expects the backend to follow up with the authentication request (no
need to craft messages manually, testing for more abstract
messages/states out of psql or some libpq wrapper would do). Better
still, if credentials/access are available, run a query.



--


Notice:
This email is confidential and may contain copyright material of
members of the Ocado Group. Opinions and views expressed in this message
may not necessarily reflect the opinions and views of the members of the
Ocado Group.

If you are not the intended recipient, please notify us
immediately and delete all copies of this message. Please note that it is
your responsibility to scan this message for viruses.

References to the
"Ocado Group" are to Ocado Group plc (registered in England and Wales with
number 7098618) and its subsidiary undertakings (as that expression is
defined in the Companies Act 2006) from time to time. The registered office
of Ocado Group plc is Buildings One & Two, Trident Place, Mosquito Way,
Hatfield, Hertfordshire, AL10 9UL.



В списке pgsql-general по дате отправления:

Предыдущее
От: Nicola Contu
Дата:
Сообщение: Re: Streaming replication - 11.5
Следующее
От: Kevin Brannen
Дата:
Сообщение: RE: pg_restore restores out of order