Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fEKZm-0006Wh-Q0 for pgsql-hackers@arkaria.postgresql.org; Thu, 03 May 2018 20:11:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fEKZl-0004Ps-BT for pgsql-hackers@arkaria.postgresql.org; Thu, 03 May 2018 20:11:37 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fEKZl-0004Pi-18 for pgsql-hackers@lists.postgresql.org; Thu, 03 May 2018 20:11:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fEKZi-00035E-2v for pgsql-hackers@postgresql.org; Thu, 03 May 2018 20:11:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w43KBPfk018605; Thu, 3 May 2018 16:11:25 -0400 From: Tom Lane To: Alvaro Herrera cc: Robert Haas , John Naylor , Stas Kelvich , Andreas Karlsson , Andrew Dunstan , PostgreSQL Hackers , David Fetter Subject: Re: unused_oids script is broken with bsd sed In-reply-to: <20180503195642.otwsjbjdtzdemumf@alvherre.pgsql> References: <20180503195642.otwsjbjdtzdemumf@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Thu, 03 May 2018 16:56:42 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18603.1525378285.1@sss.pgh.pa.us> Date: Thu, 03 May 2018 16:11:25 -0400 Message-ID: <18604.1525378285@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > Tom Lane wrote: >> However, RenameTempFile is also used by Gen_fmgrtab.pl, and having the >> same sort of no-touch semantics for fmgroids.h and friends would have some >> additional fallout. The makefiles would think they have to keep >> re-running Gen_fmgrtab.pl if fmgroids.h is older than the mod time on any >> input file, and that's certainly no good. We can fix that by inventing a >> stamp file for the Gen_fmgrtab.pl run, analogous to bki-stamp for the >> genbki.pl run, but that means changes in the makefiles that go a bit >> beyond the realm of triviality. > Sounds OK to me -- a stamp file is already established technique, so it > shouldn't go *too much* beyond triviality. Yeah, what I'm envisioning is to change the makefile rules around these files to look as much as possible like the ones around the BKI files, which are (we hope) already debugged. So it doesn't seem like a high risk change ... at least so far as the makefiles are concerned. > I do note that > msvc/Solution.pm runs Gen_fmgrtab.pl, but it shouldn't require any > changes anyhow. Hmm. Actually, given the IsNewer checks there, it looks like Solution.pm is basically hand-rolling makefile-like dependency checking, which means it would be fooled by no-touch updates in the same way as make is, causing rebuilds to do unnecessary work. We could live with that for awhile maybe, but ultimately Solution.pm would need to be fixed to use a stamp file like the makefile logic. I could take a stab at that, but I don't have any way to test it myself. regards, tom lane