Re: checkpointer and other server processes crashing - Mailing list pgsql-general

From Peter J. Holzer
Subject Re: checkpointer and other server processes crashing
Date
Msg-id 20210219170456.GE10464@hjp.at
Whole thread Raw
In response to checkpointer and other server processes crashing  (Joe Abbate <jma@freedomcircle.com>)
List 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!"

Attachment

pgsql-general by date:

Previous
From: "Peter J. Holzer"
Date:
Subject: Re: checkpointer and other server processes crashing
Next
From: "Peter J. Holzer"
Date:
Subject: Re: PostgreSQL Replication