Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSXY4-00047e-JS for pgsql-bugs@arkaria.postgresql.org; Mon, 20 May 2019 01:57:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hSXY3-0000fj-8p for pgsql-bugs@arkaria.postgresql.org; Mon, 20 May 2019 01:57:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSXY1-0000fb-GE for pgsql-bugs@lists.postgresql.org; Mon, 20 May 2019 01:57:07 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSXXy-0004GO-6R for pgsql-bugs@lists.postgresql.org; Mon, 20 May 2019 01:57:04 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5ED5023075; Sun, 19 May 2019 21:54:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sun, 19 May 2019 21:54:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=kdIYLEPC5QDpamHT1Lpzhuh21oQ 1AZdE9F+J6s6HaAo=; b=UazhVATzwcx5/VeYKNy/HWf5XZDxlhpQD1jlWV4hkdK w0NjbAKPD6mhZ+5FZoBDzXixNQ9tk/67mbMRLtbIcSC90k6CSHc/ovc5wVxVdAyM 8kKpEpDTUuiF+dlJJ6SXy9sps+N2yqH6S3JHGchKbVtiVPlGfNIMSkklt4hqv7XV eLo6D8AkiAIJcMIK0F4tOKbIL+MgjnlAtDCTitybvnG1Z+DyrvShHzMuwPcgEt6l OW2JSqzIuVp8C4OB2jWncFFEma4E6Fho366XNMaCoe0+IfZ5YuiQjpqwQo/gSt9q DevTE49lojSrDVI0rLLh54Cg4406aPTrJlj12zTaDQg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=kdIYLE PC5QDpamHT1Lpzhuh21oQ1AZdE9F+J6s6HaAo=; b=TRMH9anLvG2SMC0vL2Sc76 RAs0AiVUGAfiWbFhS5vMGq1M7iVGgGDqGGX/TOeCpvSNDKBVLK3iNgqc+8Sa5yDl Vc0UKJNi/lh9Smo0rrutvn9+1S3DBtMZnGYNLiZoace+BIdgATGeDT1uVa3fNhQR mCkYXsk7Wo9O9cfKlyOCUUnuGVx4+CYeBzB4SXNC0Gm8xlNCdiVCDmFOdL9OWo8M i2Yb7ow1gE+mQso4sfpb5HqADsbb6jMfUyalfejAW5WEXi1W6CZCfjqgx4r2PLg8 ZRPt0GdkB5jhPMC5n4HlRfSGi6p3Z0caCnYZ/kVRd/6n6n0KACbO70p/D2zf2OZA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddruddtjedgheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucfkphepudduuddruddtvddrudektddrudekheenucfrrghr rghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlh hushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id F40D380060; Sun, 19 May 2019 21:54:47 -0400 (EDT) Date: Mon, 20 May 2019 10:54:45 +0900 From: Michael Paquier To: Tom Lane Cc: Yuli Khodorkovskiy , pgsql-bugs@lists.postgresql.org, Peter Eisentraut Subject: Re: BUG #15804: Assertion failure when using logging_collector with EXEC_BACKEND Message-ID: <20190520015445.GF1923@paquier.xyz> 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IvGM3kKqwtniy32b" Content-Disposition: inline In-Reply-To: <31224.1558199235@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --IvGM3kKqwtniy32b Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --IvGM3kKqwtniy32b Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlziCOUACgkQnvQgOdby QH3Qxw//dzvRQxLbmgblDJS47E25RbwsCoGvmKoIcwgsKirTgDOWvmiraQ/xWsWj Vyrtf6RgE3cfNSf609LF5QEnmY1KUsGfUycowOiAkUvx8kwpNvl0Na2CQ+rSjtVY YXehJgj8QvqcTtGHinj8ZCD931GMXV/SGv8KUrtKvMBa2ikW0S5Cyipu4qdKznnD GeOcZKNCJlMIpnP12eCuUgd8zcUsBGCJWdi34THZURSfxdSgRCgp8zjxTaCmNlzx 73+zFpKPVy5oiQergbzN3o3UsGrDudZGoDoLq8G0rfgFB6kVpfZGQMqs/YMYVtLt Looqo6ppNeNKCc/O7W3svwHpYVugkFIsVNh1KqOn040L0A1WUT3XifhEY2u8T4KW GvuDqTE/b6UoRy3o4I1xa8rqQluNtR3Js6HDfLITgeR9zEPh2UDJ3Z30cMJ/zF01 YGReAgSKFnFPnmAdDJ7V05hh+CMk2XgE8cEgXCsCfvHoelfBC/2BGxWFPAR8eaP9 A5TEx2UTZUfpbhQs5tmaBJsAgoVwq54LkOIyiM7q6rQpnf6f1nhaG5kH0ZBQe3Sn zxJCsx/7hHLyCrf6LAtU++Hhg3U9Obpkj9QcOLg20fYpaXD05/Vo9PkRHPaa4Ajv 6fPFx3qg/lLlhXy8eq4DHW8wvDe5RDctAULzS5cm/fruK1c3V/I= =z/sl -----END PGP SIGNATURE----- --IvGM3kKqwtniy32b--