Go to file
Tomas Vondra dae761a87e Add empty BRIN ranges during CREATE INDEX
When building BRIN indexes, the brinbuildCallback only advances to the
next page range when seeing a tuple that doesn't belong to the current
one. This means that the index may end up missing ranges at the end of
the table, if those pages do not contain any indexable tuples.

We tend not to have completely empty pages at the end of a relation, but
this also applies to partial indexes, where the tuples may simply not
match the index predicate. This results in inefficient scans using the
affected BRIN index - without the summaries, the page ranges have to be
read and processed, which consumes I/O and possibly also CPU time.

The existing code already added empty ranges for earlier parts of the
table, this commit makes sure we add them for the ranges at the end of
the table too.

Patch by Matthias van de Meent, with review/improvements by me.

Author: Matthias van de Meent
Reviewed-by: Tomas Vondra
Discussion: https://postgr.es/m/CAEze2WiMsPZg%3DxkvSF_jt4%3D69k6K7gz5B8V2wY3gCGZ%2B1BzCbQ%40mail.gmail.com
2023-12-08 17:14:32 +01:00
config Remove distprep 2023-11-06 15:18:04 +01:00
contrib Add empty BRIN ranges during CREATE INDEX 2023-12-08 17:14:32 +01:00
doc doc: clarify handling of ON CONFLICT with triggers 2023-12-07 21:35:50 -05:00
src Add empty BRIN ranges during CREATE INDEX 2023-12-08 17:14:32 +01:00
.cirrus.star Remove duplicate words in docs and code comments. 2023-10-09 09:18:47 +05:30
.cirrus.tasks.yml Use "template" data directory in tests 2023-08-24 14:38:02 -07:00
.cirrus.yml ci: Make compute resources for CI configurable 2023-08-23 15:15:28 -07:00
.dir-locals.el Make Emacs perl-mode indent more like perltidy. 2019-01-13 11:32:31 -08:00
.editorconfig Add .editorconfig 2019-12-18 09:13:13 +01:00
.git-blame-ignore-revs Add "Add trailing commas to enum definitions" to .git-blame-ignore-revs 2023-10-26 13:03:43 +02:00
.gitattributes Replace Gen_dummy_probes.sed with Gen_dummy_probes.pl 2023-11-14 10:27:10 +01:00
.gitignore Update top-level .gitignore. 2022-12-04 15:23:00 -05:00
COPYRIGHT Update copyright for 2023 2023-01-02 15:00:37 -05:00
GNUmakefile.in Remove distprep 2023-11-06 15:18:04 +01:00
HISTORY Canonicalize some URLs 2020-02-10 20:47:50 +01:00
Makefile Dynamically find correct installation docs in Makefile. 2022-01-19 14:48:25 +01:00
README README: remove duplicate download link & mention related softw. 2023-11-08 16:36:18 -05:00
README.git Canonicalize some URLs 2020-02-10 20:47:50 +01:00
aclocal.m4 autoconf: Move export_dynamic determination to configure 2022-12-06 18:55:28 -08:00
configure Optimize pg_readv/pg_pwritev single vector case. 2023-11-29 17:19:25 +13:00
configure.ac Optimize pg_readv/pg_pwritev single vector case. 2023-11-29 17:19:25 +13:00
meson.build Don't clean initdb files on template creation failure 2023-12-08 13:42:54 +01:00
meson_options.txt meson: Change default of 'selinux' feature option to auto 2023-11-17 10:23:02 -08:00

README

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.

See the file INSTALL for instructions on how to build and install
PostgreSQL.  That file also lists supported operating systems and
hardware platforms and contains information regarding any other
software packages that are required to build or run the PostgreSQL
system.  Copyright and license information can be found in the
file COPYRIGHT.  A comprehensive documentation set is included in this
distribution; it can be read as described in the installation
instructions.

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/.