Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kaqQ4-00027B-Ig for pgsql-general@arkaria.postgresql.org; Fri, 06 Nov 2020 01:20:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kaqQ3-0002B0-2v for pgsql-general@arkaria.postgresql.org; Fri, 06 Nov 2020 01:19:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kaqQ2-0002At-RL for pgsql-general@lists.postgresql.org; Fri, 06 Nov 2020 01:19:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kaqQ0-0003xs-Q4 for pgsql-general@lists.postgresql.org; Fri, 06 Nov 2020 01:19:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0A61Jpj21533857; Thu, 5 Nov 2020 20:19:51 -0500 From: Tom Lane To: Michael Paquier cc: Andreas Kretschmer , Shani Israeli , pgsql-general@lists.postgresql.org Subject: Re: PANIC: could not write to log file {} at offset {}, length {}: Invalid argument In-reply-to: <20201106011028.GE21123@paquier.xyz> References: <58D3BF80-A360-4E40-883A-B3DE64DE1189@a-kretschmer.de> <20201105021012.GD1632@paquier.xyz> <1408355.1604546584@sss.pgh.pa.us> <20201106011028.GE21123@paquier.xyz> Comments: In-reply-to Michael Paquier message dated "Fri, 06 Nov 2020 10:10:28 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1533855.1604625591.1@sss.pgh.pa.us> Date: Thu, 05 Nov 2020 20:19:51 -0500 Message-ID: <1533856.1604625591@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Paquier writes: > (I got to wonder whether it would be worth the complexity to show more > information when using _dosmaperr() for WIN32 on stuff like > elog(ERROR, "%m"), just a wild thought). Maybe. It's been in the back of my mind for a long time that the _dosmaperr() mapping may be confusing us in some of these hard-to-explain trouble reports. It'd be great if we could see the original Windows error code too. Not quite sure how to mechanize that, though. Places where we do stuff like save-and-restore errno across some other operation would break any easy solution. regards, tom lane