pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Yuli Khodorkovskiy <yuli.khodorkovskiy@crunchydata.com>
Cc: pgsql-bugs@lists.postgresql.org, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Subject: Re: BUG #15804: Assertion failure when using logging_collector with EXEC_BACKEND
Date: Mon, 20 May 2019 10:54:45 +0900
Message-ID: <20190520015445.GF1923@paquier.xyz> (raw)
In-Reply-To: <31224.1558199235@sss.pgh.pa.us>
References: <4643.1557931189@sss.pgh.pa.us>
	<20190516013808.GA1415@paquier.xyz>
	<20190516021903.GB1415@paquier.xyz>
	<28927.1557977558@sss.pgh.pa.us>
	<20190516035617.GC1415@paquier.xyz>
	<20190516043618.GD1415@paquier.xyz>
	<31437.1557982294@sss.pgh.pa.us>
	<20190516060628.GE1415@paquier.xyz>
	<20190517042536.GM20887@paquier.xyz>
	<31224.1558199235@sss.pgh.pa.us>

On Sat, May 18, 2019 at 01:07:15PM -0400, Tom Lane wrote:
> I've not worked that out in any detail; getting the switches included
> properly might be too much of a pain for this to be an improvement.
> But for sure I don't want there to be multiple copies of that list of
> which subprocess types use shared memory.

Getting rid of the process list dependency would be nice.

> A variant idea is to include shared_memory_exists in what's passed down
> by the BackendParameters mechanism, and then subprocesses can adjust
> their behavior for themselves.

I actually got to think about having extra switches to control the
re-attachment of sub-processes when thinking about a solution, and I
agree that it would be much cleaner.  The idea about using backend
parameters is interesting (I haven't considered it), though I feel
that this could introduce race conditions as the process startup
scheduling can cause tricky issues on Windows, so I think that this
would make the system less robust.  Using a state specific to the
postmaster for the decision-making ensures a single entry point.

> In any case, the thrust of all of this is that we shouldn't touch any
> of the assertions in the shmem support files; rather, the way to fix
> it is to improve the logic in postmaster.c so that we don't call those
> functions at all in child processes that are launched before shmem
> exists.

I certainly agree with that.  Those assertions are here to stay.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../20190520015445.GF1923@paquier.xyz/2-signature.asc)
  download

view thread (40+ messages)  latest in thread

Message-ID: <20190520015445.GF1923@paquier.xyz>
Permalink:  ../20190520015445.GF1923@paquier.xyz/
Also on:    postgresql.org/message-id/20190520015445.GF1923@paquier.xyz

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, tgl@sss.pgh.pa.us, yuli.khodorkovskiy@crunchydata.com, peter.eisentraut@2ndquadrant.com
  Subject: Re: BUG #15804: Assertion failure when using logging_collector with EXEC_BACKEND
  In-Reply-To: <20190520015445.GF1923@paquier.xyz>

* 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