Re: checkpointer and other server processes crashing

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Re: checkpointer and other server processes crashing
Дата
Msg-id 20210219170456.GE10464@hjp.at
обсуждение исходный текст
Ответ на checkpointer and other server processes crashing  (Joe Abbate <jma@freedomcircle.com>)
Список pgsql-general
On 2021-02-15 16:15:44 -0500, Joe Abbate wrote:
> As I understand it, the PG server processes doing a SELECT are spawned as
> children of the Go process,

There's a misconception here: The server processes are children of the
postmaster process, not of the client program (whether it's written in
Go or any other language). Think about it: The database server and the
client may not even be on the same machine, so there cannot be a
parent/child relationship between client and server processes.

> so presumably if a "goroutine" dies, the associated PG process would
> die too,

A server process will terminate when the connection is closed, but it
may not notice that immediately. Moreover, since Goroutines are handled
by the Go runtime, not the Linux kernel, the connection may not be
closed just because a goroutine terminates (actually, I think the
standard API pretty much guarantuees the existence of a connection
pool).

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Вложения

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

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: checkpointer and other server processes crashing
Следующее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: PostgreSQL Replication