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 1hR9Y7-00046I-MK for pgsql-bugs@arkaria.postgresql.org; Thu, 16 May 2019 06:07:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hR9Y6-0008C7-Ec for pgsql-bugs@arkaria.postgresql.org; Thu, 16 May 2019 06:07:26 +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 1hR9Y4-0008Bz-OT for pgsql-bugs@lists.postgresql.org; Thu, 16 May 2019 06:07:26 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hR9Y1-0005uG-Fz for pgsql-bugs@lists.postgresql.org; Thu, 16 May 2019 06:07:23 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1409E3BC; Thu, 16 May 2019 02:07:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 16 May 2019 02:07:19 -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=tN6Oeh9qm+flqqAd7IMEU7sc+Qw jaKIBCZjbiXj6Q84=; b=ABzvEvcA8fsKFCwJcTzsJxrgqQuXWPkJ2RSxLLpHSqS MiDl98GpM3txQ7YgzcKTQOsksQD29d5WFV/a6locAH3Rmju+5V+BoVinMyuAzXvg xOU1DMuDkSpI2wXJwiodvHlmC7uq923f8SsetnAhyjHy1uBUzCwuuDbbCyd1Aqct 5Q7aTO3XxdqpZNZp+4qpeZtQcpRsh98Mkb0YdoOEq2+qLjfdMvrOIvODyF9vEw4t vLSCPuGxB970eE2PxtOOdYJH6+yCzylpuGlRkwDgUNn2BMWzD5pDREh6nNymMp7r A7oMk3k9VHfdSzDWZPPCoLB4OJUi0Vu8MiZXYKOQwkg== 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=tN6Oeh 9qm+flqqAd7IMEU7sc+QwjaKIBCZjbiXj6Q84=; b=npZK0/OJgA3sod/4HYDqqI c/VxSIVGsLYsvx+tDaWKJqb1BQFKwTV3lLvno/Q0gLqdJdhNsV4k8n3ueMqQrbrL LU+8c9ZwY00Db/xD/LoLxhGTnzbbIkSPCtvb6PRrkhRuDbOJOf553rt2d+3HED8V /3EHXp7qf6GoVeZUoUSmb8pyHyYlRziCCM93aPb2UquFN4L1Phw9wtIoEAZfXnfP NyY0wHeA00fKAHWrPdlTn35X11VZ4e+ERuN1pnW8Z1wONDp7ymQp2+POHIoZmlrf mPOnQ+vq6QE4lDR30OaZ6w4l+kSENXVE1Ozzr/DfgJXuj7WB2o7AtAP9RMsOJQIQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrleelgddutdegucetufdoteggodetrfdotf 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 0FD1380062; Thu, 16 May 2019 02:06:55 -0400 (EDT) Date: Thu, 16 May 2019 15:06:28 +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: <20190516060628.GE1415@paquier.xyz> References: <27CD45B5-88F7-4A09-8B31-EFE41FC37FE1@crunchydata.com> <26332.1557863524@sss.pgh.pa.us> <20190515073125.GA1517@paquier.xyz> <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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="R6sEYoIZpp9JErk7" Content-Disposition: inline In-Reply-To: <31437.1557982294@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --R6sEYoIZpp9JErk7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, May 16, 2019 at 12:51:34AM -0400, Tom Lane wrote: > Hm, should we separate the cleanup of the root pgsql_tmp/ from the rest of > what RemovePgTempFiles does? I'm still feeling like we should be trying > to launch the syslogger as soon as possible. Indeed, this should be safe, the syslogger is not going to touch any of the other temp files anyway. If we begin to do that, we had better update the comments at the top of RemovePgTempFiles()'s call, and expose RemovePgTempFilesInDir(). Anyway, I have to admit that I am not really enthusiastic about relaxing the assertions for the win32 and the sysv interfaces, and do that inconsistently on top of it. As far as my first investigations have gone, assertions in pgwin32_ReserveSharedMemoryRegion() and PGSharedMemoryReAttach():sysv_shmem.c would need relaxing, but we rely on that since a7e5878, which is quite some time ago. And, actually, the failure for pgwin32_ReserveSharedMemoryRegion() should never happen at all, because we need to call reset_shared() before starting the syslogger as well, no? If we want to be able to log the creation socket messages with the logging collector, it seems to me that we would need first to remove the dependency with the port number in PGSharedMemoryCreate() to find a free IPC key. Thoughts? -- Michael --R6sEYoIZpp9JErk7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlzc/eQACgkQnvQgOdby QH1C+g//dmhq65VcRL3/41eygB367DU38jsQPCHYTwvfQLhp3FzTCTG2V+QPSUL/ Gbd63Nq5zzGT4u/UK/91irvz1yAdNSpoFQin0oTaF6mE83E5C9RcuG3re9TK3F9S q5tKy3kjNvDEGm4i4vUyeNZYZnCxjlnpU2A9YHCfSKP8ysHtlk8HqFqw2RH3sBej ZLOB+EWglw+00lQwBaYppJY6770eDVeA9uDiumRrK6GpQY+EAMHDET8N4V8+j5By Th4Pp2lT/6YqFVl4UpLqAN2m7yt7N+sWh+NwlDM0DSKVVJtyPv0ApzWNSwn29JFJ Ayz9+DveGYPSEFVtMiuwzDUA3XKpwL4bzQsLTna0aXU4qFKotmTcrZxV+FQ9UAr+ F9LFG2yJ3wM/5WXZ+rfIo4US9dSQ9zjx3mvNAEQ0aQ6M9O0lws0h4ujC6tV+5ZvP CZ+A6V1Iy49sjRGYcRx+oLlSJS6F9ZADInzTMhItsV97sCMArfODZkLrYCzuz7fl VUK6Lo4MAhS2dhsVlYmKud0C7lOfdSW7au1x1U37lkB1+8krYyYvfO9o/yU8i/VW w1szoZGiZdleWEI2tA7uKWzJ/sBXBt57a+XK1s9ecVEZuyUt/8sdETeYb8FtHhY/ p1gIYlj6qsPfQMNjMKhXayUIWSavOHx6SwIHIeVuDbb3//fsQD4= =mVfd -----END PGP SIGNATURE----- --R6sEYoIZpp9JErk7--