pgsql: Eliminate parallel-make hazard in ecpg/preproc.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Eliminate parallel-make hazard in ecpg/preproc.
Date: 2018-12-01 22:19:56
Message-ID: E1gTDcC-0002Qc-Gp@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Eliminate parallel-make hazard in ecpg/preproc.

Re-making ecpglib's typename.o is dangerous because another make thread
could be doing that at the same time. While we've not heard field
complaints traceable to this, it seems inevitable that it'd bite someone
eventually. Instead, symlink typename.c into the preproc directory and
recompile it there. That file is small enough that compiling it twice
isn't much of a penalty. Furthermore, this way we get a .o file that's
made without shlib CFLAGS, which seems cleaner.

This requires adding more stuff to the module's -I list. The MSVC
aspect of that is untested, but I'm sure the buildfarm will tell me
if I got it wrong.

Per a suggestion from Peter Eisentraut. Although this is theoretically
a bug fix, the lack of field reports makes me feel we needn't back-patch.

Discussion: https://postgr.es/m/31364.1543511708@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/29180e5d78e545472b1665b8d415e6917a5bf333

Modified Files
--------------
src/interfaces/ecpg/preproc/.gitignore | 2 +-
src/interfaces/ecpg/preproc/Makefile | 15 ++++++++++-----
src/tools/msvc/Mkvcbuild.pm | 1 +
3 files changed, 12 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2018-12-03 00:28:39 pgsql: Add PGXS options to control TAP and isolation tests, take two
Previous Message Tom Lane 2018-12-01 21:34:20 pgsql: Rename ecpg's various "extern.h" files to have distinct names.