postgresql/src
Heikki Linnakangas 9155580fd5 Generate less WAL during GiST, GIN and SP-GiST index build.
Instead of WAL-logging every modification during the build separately,
first build the index without any WAL-logging, and make a separate pass
through the index at the end, to write all pages to the WAL. This
significantly reduces the amount of WAL generated, and is usually also
faster, despite the extra I/O needed for the extra scan through the index.
WAL generated this way is also faster to replay.

For GiST, the LSN-NSN interlock makes this a little tricky. All pages must
be marked with a valid (i.e. non-zero) LSN, so that the parent-child
LSN-NSN interlock works correctly. We now use magic value 1 for that during
index build. Change the fake LSN counter to begin from 1000, so that 1 is
safely smaller than any real or fake LSN. 2 would've been enough for our
purposes, but let's reserve a bigger range, in case we need more special
values in the future.

Author: Anastasia Lubennikova, Andrey V. Lepikhov
Reviewed-by: Heikki Linnakangas, Dmitry Dolgov
2019-04-03 17:03:15 +03:00
..
backend Generate less WAL during GiST, GIN and SP-GiST index build. 2019-04-03 17:03:15 +03:00
bin Add progress reporting to pg_checksums 2019-04-02 10:58:07 +09:00
common Add support for partial TOAST decompression 2019-04-02 12:35:32 -04:00
fe_utils Unified logging system for command-line programs 2019-04-01 20:01:35 +02:00
include Generate less WAL during GiST, GIN and SP-GiST index build. 2019-04-03 17:03:15 +03:00
interfaces Unified logging system for command-line programs 2019-04-01 20:01:35 +02:00
makefiles Move port-specific parts of with_temp_install to port makefile. 2019-02-04 18:54:56 +00:00
pl Generated columns 2019-03-30 08:15:57 +01:00
port Fix error handling of readdir() port implementation on first file lookup 2019-03-04 09:49:06 +09:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Update expected output for modified catalog definition 2019-04-02 15:45:45 -03:00
timezone More unconstify use 2019-02-13 11:50:16 +01:00
tools Unified logging system for command-line programs 2019-04-01 20:01:35 +02:00
tutorial SQL comment: remove extra word in heading comment 2019-01-25 18:57:21 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Revert attempts to use POPCNT etc instructions 2019-02-15 16:32:30 -03:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk Unified logging system for command-line programs 2019-04-01 20:01:35 +02:00