postgresql/contrib
Alvaro Herrera 5de890e361
Add EXPLAIN (MEMORY) to report planner memory consumption
This adds a new "Memory:" line under the "Planning:" group (which
currently only has "Buffers:") when the MEMORY option is specified.

In order to make the reporting reasonably accurate, we create a separate
memory context for planner activities, to be used only when this option
is given.  The total amount of memory allocated by that context is
reported as "allocated"; we subtract memory in the context's freelists
from that and report that result as "used".  We use
MemoryContextStatsInternal() to obtain the quantities.

The code structure to show buffer usage during planning was not in
amazing shape, so I (Álvaro) modified the patch a bit to clean that up
in passing.

Author: Ashutosh Bapat
Reviewed-by: David Rowley, Andrey Lepikhov, Jian He, Andy Fan
Discussion: https://www.postgresql.org/message-id/CAExHW5sZA=5LJ_ZPpRO-w09ck8z9p7eaYAqq3Ks9GDfhrxeWBw@mail.gmail.com
2024-01-29 17:53:03 +01:00
..
adminpack Update copyright for 2024 2024-01-03 20:49:05 -05:00
amcheck Update copyright for 2024 2024-01-03 20:49:05 -05:00
auth_delay Update copyright for 2024 2024-01-03 20:49:05 -05:00
auto_explain Add EXPLAIN (MEMORY) to report planner memory consumption 2024-01-29 17:53:03 +01:00
basebackup_to_shell Update copyright for 2024 2024-01-03 20:49:05 -05:00
basic_archive Update copyright for 2024 2024-01-03 20:49:05 -05:00
bloom Update copyright for 2024 2024-01-03 20:49:05 -05:00
bool_plperl Update copyright for 2024 2024-01-03 20:49:05 -05:00
btree_gin Update copyright for 2024 2024-01-03 20:49:05 -05:00
btree_gist Fix comment on gist_stratnum_btree 2024-01-25 07:25:10 +01:00
citext Update copyright for 2024 2024-01-03 20:49:05 -05:00
cube Update copyright for 2024 2024-01-03 20:49:05 -05:00
dblink Make dblink interruptible, via new libpqsrv APIs. 2024-01-08 11:39:56 -08:00
dict_int Update copyright for 2024 2024-01-03 20:49:05 -05:00
dict_xsyn Update copyright for 2024 2024-01-03 20:49:05 -05:00
earthdistance Update copyright for 2024 2024-01-03 20:49:05 -05:00
file_fdw Update copyright for 2024 2024-01-03 20:49:05 -05:00
fuzzystrmatch Update copyright for 2024 2024-01-03 20:49:05 -05:00
hstore Update copyright for 2024 2024-01-03 20:49:05 -05:00
hstore_plperl Update copyright for 2024 2024-01-03 20:49:05 -05:00
hstore_plpython Update copyright for 2024 2024-01-03 20:49:05 -05:00
intagg Update copyright for 2024 2024-01-03 20:49:05 -05:00
intarray Fix integer-overflow problem in intarray's g_int_decompress(). 2024-01-07 15:19:50 -05:00
isn Update copyright for 2024 2024-01-03 20:49:05 -05:00
jsonb_plperl Update copyright for 2024 2024-01-03 20:49:05 -05:00
jsonb_plpython Update copyright for 2024 2024-01-03 20:49:05 -05:00
lo Update copyright for 2024 2024-01-03 20:49:05 -05:00
ltree Update copyright for 2024 2024-01-03 20:49:05 -05:00
ltree_plpython Update copyright for 2024 2024-01-03 20:49:05 -05:00
oid2name Update copyright for 2024 2024-01-03 20:49:05 -05:00
pageinspect Update copyright for 2024 2024-01-03 20:49:05 -05:00
passwordcheck Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_buffercache Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_freespacemap Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_prewarm Fix crash in autoprewarm. 2024-01-23 14:20:14 -06:00
pg_stat_statements Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_surgery Error message capitalisation 2024-01-18 09:35:12 +01:00
pg_trgm Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_visibility Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_walinspect Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgcrypto Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgrowlocks Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgstattuple Update copyright for 2024 2024-01-03 20:49:05 -05:00
postgres_fdw Add better handling of redundant IS [NOT] NULL quals 2024-01-23 18:09:18 +13:00
seg seg: Add test "security" in meson.build 2024-01-18 10:12:44 +09:00
sepgsql Update copyright for 2024 2024-01-03 20:49:05 -05:00
spi Update copyright for 2024 2024-01-03 20:49:05 -05:00
sslinfo Update copyright for 2024 2024-01-03 20:49:05 -05:00
start-scripts Remove gratuitous references to postmaster program 2023-01-26 10:48:32 +01:00
tablefunc Update copyright for 2024 2024-01-03 20:49:05 -05:00
tcn Update copyright for 2024 2024-01-03 20:49:05 -05:00
test_decoding Remove ReorderBufferTupleBuf structure. 2024-01-29 10:37:16 +09:00
tsm_system_rows Update copyright for 2024 2024-01-03 20:49:05 -05:00
tsm_system_time Update copyright for 2024 2024-01-03 20:49:05 -05:00
unaccent Update copyright for 2024 2024-01-03 20:49:05 -05:00
uuid-ossp Update copyright for 2024 2024-01-03 20:49:05 -05:00
vacuumlo Update copyright for 2024 2024-01-03 20:49:05 -05:00
xml2 Revert "Add support for parsing of large XML data (>= 10MB)" 2024-01-26 10:15:32 +09:00
Makefile Remove the "snapshot too old" feature. 2023-09-05 19:53:43 +12:00
README Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00
contrib-global.mk Respect TEMP_CONFIG when pg_regress_check and friends are called 2016-02-27 12:28:21 -05:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00

README

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.