pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Re: checkpointer and other server processes crashing
Date: Fri, 19 Feb 2021 18:04:56 +0100
Message-ID: <20210219170456.GE10464@hjp.at> (raw)
In-Reply-To: <e426330d-bdbb-98d8-5e74-09998258503d@freedomcircle.com>
References: <e426330d-bdbb-98d8-5e74-09998258503d@freedomcircle.com>

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!"

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (7+ messages)

Message-ID: <20210219170456.GE10464@hjp.at>
Permalink:  ../20210219170456.GE10464@hjp.at/
Also on:    postgresql.org/message-id/20210219170456.GE10464@hjp.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: hjp-pgsql@hjp.at
  Subject: Re: checkpointer and other server processes crashing
  In-Reply-To: <20210219170456.GE10464@hjp.at>
  References: <e426330d-bdbb-98d8-5e74-09998258503d@freedomcircle.com> <20210219170456.GE10464@hjp.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox