Re: [Question]What will happen if the server active close the connection?

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: [Question]What will happen if the server active close the connection?
Дата
Msg-id ae92b173bc848d68bb178886518ca8489e3c4993.camel@cybertec.at
обсуждение исходный текст
Ответ на [Question]What will happen if the server active close the connection?  ("Wen Yi" <896634148@qq.com>)
Список pgsql-general
On Mon, 2023-06-05 at 10:18 +0800, Wen Yi wrote:
> when I study the tcp connection, I found that if the server active close the connection,
> the server will send a fin package to the client and the client will reply a ack package.
> As this:
>
> Server ---->(FIN) Client
> Server <----(ACK) Client
>
> My question is, in so many articles, the following step is, the client will write some
> data(send some data) to the server and then cause the signal SIGNALPIPE.
> But what will happen if the client died?(Example: was killed by the user)

If the server has already closed the connection, nothing much will happen.
If the client never sends ACK to the FIN, the session will still time out.

You can fiddle with the tcp_keepalives_* parameters to influence that.

Yours,
Laurenz Albe



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

Предыдущее
От: gzh
Дата:
Сообщение: Is there any good optimization solution to improve the query efficiency?
Следующее
От: Oliver Kohll
Дата:
Сообщение: Re: Is there any good optimization solution to improve the query efficiency?