postgres/contrib
Tom Lane de239d01e7 Consistently use PageGetExactFreeSpace() in pgstattuple.
Previously this code used PageGetHeapFreeSpace on heap pages,
and usually used PageGetFreeSpace on index pages (though for some
reason GetHashPageStats used PageGetExactFreeSpace instead).
The difference is that those functions subtract off the size of
a line pointer, and PageGetHeapFreeSpace has some additional
rules about returning zero if adding another line pointer would
require exceeding MaxHeapTuplesPerPage.  Those things make sense
when testing to see if a new tuple can be put on the page, but
they seem pretty strange for pure statistics collection.

Additionally, statapprox_heap had a special rule about counting
a "new" page as being fully available space.  This also seems
strange, because it's not actually usable until VACUUM or some
such process initializes the page.  Moreover, it's inconsistent
with what pgstat_heap does, which is to count such a page as
having zero free space.  So make it work like pgstat_heap, which
as of this patch unconditionally calls PageGetExactFreeSpace.

This is more of a definitional change than a bug fix, so no
back-patch.  The module's documentation doesn't define exactly
what "free space" means either, so we left that as-is.

Frédéric Yhuel, reviewed by Rafia Sabih and Andreas Karlsson.

Discussion: https://postgr.es/m/3a18f843-76f6-4a84-8cca-49537fefa15d@dalibo.com
2024-09-09 14:34:10 -04:00
..
amcheck amcheck: Optimize speed of checking for unique constraint violation 2024-07-28 13:50:57 +03: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 Add built-in ERROR handling for archive callbacks. 2024-04-02 22:28:11 -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 Mark misc static global variables as const 2024-08-06 23:04:48 +03:00
citext Add argument names to the regexp_XXX functions. 2024-07-25 14:51:46 -04:00
cube Include bison header files into implementation files 2024-08-02 10:25:11 +02:00
dblink Don't bother checking the result of SPI_connect[_ext] anymore. 2024-09-09 12:18:34 -04: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 Treat number of disabled nodes in a path as a separate cost metric. 2024-08-21 10:12:30 -04:00
fuzzystrmatch Update copyright for 2024 2024-01-03 20:49:05 -05:00
hstore Optimize escaping of JSON strings 2024-07-27 23:46:07 +12: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 Use new overflow-safe integer comparison functions. 2024-02-16 14:05:36 -06:00
isn Convert some extern variables to static 2024-07-02 07:26:22 +02: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 Add hash support functions and hash opclass for contrib/ltree. 2024-03-21 18:27:49 -04:00
ltree_plpython Update copyright for 2024 2024-01-03 20:49:05 -05:00
oid2name Apply more quoting to GUC names in messages 2024-09-04 13:50:44 +09:00
pageinspect Remove incidental md5() function use from test 2024-08-16 17:14:32 +02:00
passwordcheck Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_buffercache Add pg_buffercache_evict() function for testing. 2024-04-08 16:23:40 +12:00
pg_freespacemap Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_prewarm Add block_range_read_stream_cb(), to deduplicate code. 2024-09-03 10:46:20 -07:00
pg_stat_statements Remove volatile qualifiers from pg_stat_statements.c. 2024-08-06 10:56:37 -05:00
pg_surgery Error message capitalisation 2024-01-18 09:35:12 +01:00
pg_trgm Use new overflow-safe integer comparison functions. 2024-02-16 14:05:36 -06:00
pg_visibility Revert "Optimize pg_visibility with read streams." 2024-09-04 11:36:40 -07:00
pg_walinspect Assign error codes where missing for user-facing failures 2024-07-04 09:48:40 +09:00
pgcrypto Remove support for OpenSSL older than 1.1.0 2024-09-02 13:51:48 +02:00
pgrowlocks Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgstattuple Consistently use PageGetExactFreeSpace() in pgstattuple. 2024-09-09 14:34:10 -04:00
postgres_fdw Make postgres_fdw's query_cancel test less flaky. 2024-08-30 16:47:39 -04:00
seg Include bison header files into implementation files 2024-08-02 10:25:11 +02:00
sepgsql Revise GUC names quoting in messages again 2024-05-17 11:44:26 +02:00
spi Don't bother checking the result of SPI_connect[_ext] anymore. 2024-09-09 12:18:34 -04:00
sslinfo Revert "Add notBefore and notAfter to SSL cert info display" 2024-03-22 22:58:41 +01:00
start-scripts Remove gratuitous references to postmaster program 2023-01-26 10:48:32 +01:00
tablefunc Don't bother checking the result of SPI_connect[_ext] anymore. 2024-09-09 12:18:34 -04:00
tcn Update copyright for 2024 2024-01-03 20:49:05 -05:00
test_decoding Fix typos and grammar in code comments and docs 2024-09-03 14:49:04 +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 Add simple codepoint redirections to unaccent.rules. 2024-07-05 15:25:31 +12:00
uuid-ossp Make the order of the header file includes consistent 2024-03-13 15:07:00 +01:00
vacuumlo Apply more quoting to GUC names in messages 2024-09-04 13:50:44 +09:00
xml2 Don't bother checking the result of SPI_connect[_ext] anymore. 2024-09-09 12:18:34 -04:00
Makefile Remove the adminpack contrib extension 2024-03-04 12:39:22 +01: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 Remove the adminpack contrib extension 2024-03-04 12:39:22 +01: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.