pgsql: Add a --socketdir option to pg_upgrade.

2018-12-01 Thread Tom Lane
Add a --socketdir option to pg_upgrade. This allows control of the directory in which the postmaster sockets are created for the temporary postmasters started by pg_upgrade. The default location remains the current working directory, which is typically fine, but if it is deeply nested then its pat

pgsql: Rename ecpg's various "extern.h" files to have distinct names.

2018-12-01 Thread Tom Lane
Rename ecpg's various "extern.h" files to have distinct names. This should reduce confusion, and in particular make it safe to copy typename.c into preproc/ and compile it there. This doesn't affect anything outside ecpg, and particularly not end users, because these files don't get installed; th

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

2018-12-01 Thread Tom Lane
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