postgresql/contrib
Andres Freund e5555657ba meson: Add support for building with precompiled headers
This substantially speeds up building for windows, due to the vast amount of
headers included via windows.h. A cross build from linux targetting mingw goes
from

994.11user 136.43system 0:31.58elapsed 3579%CPU
to
422.41user 89.05system 0:14.35elapsed 3562%CPU

The wins on windows are similar-ish (but I don't have a system at hand just
now for actual numbers). Targetting other operating systems the wins are far
smaller (tested linux, macOS, FreeBSD).

For now precompiled headers are disabled by default, it's not clear how well
they work on all platforms. E.g. on FreeBSD gcc doesn't seem to have working
support, but clang does.

When doing a full build precompiled headers are only beneficial for targets
with multiple .c files, as meson builds a separate precompiled header for each
target (so that different compilation options take effect). This commit
therefore only changes target with at least two .c files to use precompiled
headers.

Because this commit adds b_pch=false to the default_options new build
directories will have precompiled headers disabled by default, however
existing build directories will continue use the default value of b_pch, which
is true.

Note that using precompiled headers with ccache requires setting
CCACHE_SLOPPINESS=pch_defines,time_macros to get hits.

Reviewed-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Reviewed-by: Justin Pryzby <pryzby@telsasoft.com>
Discussion: https://postgr.es/m/CA+hUKG+50eOUbN++ocDc0Qnp9Pvmou23DSXu=ZA6fepOcftKqA@mail.gmail.com
Discussion: https://postgr.es/m/c5736f70-bb6d-8d25-e35c-e3d886e4e905@enterprisedb.com
Discussion: https://postgr.es/m/20190826054000.GE7005%40paquier.xyz
2022-10-06 17:19:30 -07:00
..
adminpack tests: Rename conflicting role names 2022-10-05 10:43:13 -07:00
amcheck meson: Add windows resource files 2022-10-05 09:56:05 -07:00
auth_delay meson: Add windows resource files 2022-10-05 09:56:05 -07:00
auto_explain meson: Add windows resource files 2022-10-05 09:56:05 -07:00
basebackup_to_shell meson: Add windows resource files 2022-10-05 09:56:05 -07:00
basic_archive meson: Add windows resource files 2022-10-05 09:56:05 -07:00
bloom meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
bool_plperl meson: Add windows resource files 2022-10-05 09:56:05 -07:00
btree_gin meson: Add windows resource files 2022-10-05 09:56:05 -07:00
btree_gist meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
citext meson: Add windows resource files 2022-10-05 09:56:05 -07:00
cube meson: Add windows resource files 2022-10-05 09:56:05 -07:00
dblink meson: Add windows resource files 2022-10-05 09:56:05 -07:00
dict_int meson: Add windows resource files 2022-10-05 09:56:05 -07:00
dict_xsyn meson: Add windows resource files 2022-10-05 09:56:05 -07:00
earthdistance meson: Add windows resource files 2022-10-05 09:56:05 -07:00
file_fdw Fix final warnings produced by -Wshadow=compatible-local 2022-10-07 13:13:27 +13:00
fuzzystrmatch meson: Add windows resource files 2022-10-05 09:56:05 -07:00
hstore meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
hstore_plperl meson: Add windows resource files 2022-10-05 09:56:05 -07:00
hstore_plpython meson: Add windows resource files 2022-10-05 09:56:05 -07:00
intagg meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
intarray meson: Add windows resource files 2022-10-05 09:56:05 -07:00
isn meson: Add windows resource files 2022-10-05 09:56:05 -07:00
jsonb_plperl meson: Add windows resource files 2022-10-05 09:56:05 -07:00
jsonb_plpython meson: Add windows resource files 2022-10-05 09:56:05 -07:00
lo meson: Add windows resource files 2022-10-05 09:56:05 -07:00
ltree Remove useless character-length checks in contrib/ltree. 2022-10-06 11:18:32 -04:00
ltree_plpython meson: Add windows resource files 2022-10-05 09:56:05 -07:00
oid2name meson: Add windows resource files 2022-10-05 09:56:05 -07:00
old_snapshot meson: Add windows resource files 2022-10-05 09:56:05 -07:00
pageinspect meson: Add windows resource files 2022-10-05 09:56:05 -07:00
passwordcheck tests: Rename conflicting role names 2022-10-05 10:43:13 -07:00
pg_buffercache meson: Add windows resource files 2022-10-05 09:56:05 -07:00
pg_freespacemap meson: Add windows resource files 2022-10-05 09:56:05 -07:00
pg_prewarm meson: Add windows resource files 2022-10-05 09:56:05 -07:00
pg_stat_statements meson: Add windows resource files 2022-10-05 09:56:05 -07:00
pg_surgery meson: Add windows resource files 2022-10-05 09:56:05 -07:00
pg_trgm meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
pg_visibility meson: Add windows resource files 2022-10-05 09:56:05 -07:00
pg_walinspect meson: Add windows resource files 2022-10-05 09:56:05 -07:00
pgcrypto meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
pgrowlocks meson: Add windows resource files 2022-10-05 09:56:05 -07:00
pgstattuple meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
postgres_fdw Fix final warnings produced by -Wshadow=compatible-local 2022-10-07 13:13:27 +13:00
seg meson: Add windows resource files 2022-10-05 09:56:05 -07:00
sepgsql meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
spi meson: Add windows resource files 2022-10-05 09:56:05 -07:00
sslinfo meson: Add windows resource files 2022-10-05 09:56:05 -07:00
start-scripts Remove contrib/start-scripts/osx/. 2017-11-17 12:53:20 -05:00
tablefunc meson: Add windows resource files 2022-10-05 09:56:05 -07:00
tcn meson: Add windows resource files 2022-10-05 09:56:05 -07:00
test_decoding meson: Add windows resource files 2022-10-05 09:56:05 -07:00
tsm_system_rows meson: Add windows resource files 2022-10-05 09:56:05 -07:00
tsm_system_time meson: Add windows resource files 2022-10-05 09:56:05 -07:00
unaccent meson: Add windows resource files 2022-10-05 09:56:05 -07:00
uuid-ossp meson: Add windows resource files 2022-10-05 09:56:05 -07:00
vacuumlo meson: Add windows resource files 2022-10-05 09:56:05 -07:00
xml2 meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
contrib-global.mk Respect TEMP_CONFIG when pg_regress_check and friends are called 2016-02-27 12:28:21 -05:00
Makefile Add contrib/pg_walinspect. 2022-04-08 00:26:44 -07:00
meson.build meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
README Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00

The PostgreSQL contrib tree
---------------------------

This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly
because they address a limited audience or are too experimental to be
part of the main source tree.  This does not preclude their
usefulness.

User documentation for each module appears in the main SGML
documentation.

When building from the source distribution, these modules are not
built automatically, unless you build the "world" target.  You can
also build and install them all by running "make all" and "make
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.

Some directories supply new user-defined functions, operators, or
types.  To make use of one of these modules, after you have installed
the code you need to register the new SQL objects in the database
system by executing a CREATE EXTENSION command.  In a fresh database,
you can simply do

    CREATE EXTENSION module_name;

See the PostgreSQL documentation for more information about this
procedure.