Commit0785d1b8bwrote jsonapi_shlib.o: override CPPFLAGS += -DJSONAPI_USE_PQEXPBUFFER forgetting that GNU make treats this change to CPPFLAGS as affecting not only jsonapi_shlib.o, but anything that gets built in pursuit of building jsonapi_shlib.o. Because of an even more ancient hack (cf7143b3e82), that will include jsonapi.o if it's not been built already. If we do apply this -D switch to jsonapi.o, it gets built with the wrong expansible-string infrastructure, which manifests immediately as a link failure in pg_combinebackup and would misbehave at runtime even if the build somehow completed. Perhaps remarkably, we'd not seen field reports of build failures till now, but it's pretty easy to reproduce a mis-build by trying to build src/common/ with --shuffle and a high -j factor. To fix, don't modify CPPFLAGS this way; instead make a dedicated build rule for jsonapi_shlib.o that injects the additional switches. There might be other places with similar problems, but some desultory attempts with -j32 --shuffle on a 32-thread CPU didn't find any more build failures. Also, it looks like the meson build infrastructure lacks this problem (but I'm no meson expert). Bug: #19727 Reported-by: Ross Burton <ross@burtonini.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Ross Burton <ross@burtonini.com> Discussion: https://postgr.es/m/19727-32d67d9dea410f38@postgresql.org Backpatch-through: 18
PostgreSQL Database Management System
This directory contains the source code distribution of the PostgreSQL database management system.
PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings.
Copyright and license information can be found in the file COPYRIGHT.
General documentation about this version of PostgreSQL can be found at https://www.postgresql.org/docs/devel/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/devel/installation.html.
The latest version of this software, and related software, may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.