postgresql/src
Peter Geoghegan c34787f910 Harden nbtree page deletion.
Add some additional defensive checks in the second phase of index
deletion to detect and report index corruption during VACUUM, and to
avoid having VACUUM become stuck in more cases.  The code is still not
robust in the presence of a circular chain of sibling links, though it's
not clear whether that really matters.  This is follow-up work to commit
3a01f68e.

The new defensive checks rely on the assumption that there can be no
more than one VACUUM operation running for an index at any given time.
Remove an old comment suggesting that multiple concurrent VACUUMs need
to be considered here.  This concern now seems highly unlikely to have
any real validity, since we clearly rely on the same assumption in
several other places.  For example, there are much more recent comments
that appear in the same function (added by commit efada2b8e9) that make
the same assumption.

Also add a CHECK_FOR_INTERRUPTS() to the relevant code path.  Contrary
to comments added by commit 3a01f68e, it is actually possible to handle
interrupts here, at least in the common case where processing takes
place at the leaf level.  We only hold a pin on leafbuf/target page when
stepping right at the leaf level.

No backpatch due to the lack of complaints following hardening added to
the same area by commit 3a01f68e.
2021-02-04 15:42:36 -08:00
..
backend Harden nbtree page deletion. 2021-02-04 15:42:36 -08:00
bin Add TABLESPACE option to REINDEX 2021-02-04 14:34:20 +09:00
common Introduce --with-ssl={openssl} as a configure option 2021-02-01 19:19:44 +09:00
fe_utils Factor pattern-construction logic out of processSQLNamePattern. 2021-02-03 13:19:41 -05:00
include Add TABLESPACE option to REINDEX 2021-02-04 14:34:20 +09:00
interfaces Introduce --with-ssl={openssl} as a configure option 2021-02-01 19:19:44 +09:00
makefiles
pl Remove extra increment of plpgsql's statement counter for FOR loops. 2021-02-02 14:35:12 -05:00
port Move our p{read,write}v replacements into their own files. 2021-01-14 11:16:59 +13:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Add TABLESPACE option to REINDEX 2021-02-04 14:34:20 +09:00
timezone Update time zone data files to tzdata release 2021a. 2021-01-24 16:29:47 -05:00
tools Retire findoidjoins. 2021-02-02 17:21:37 -05:00
tutorial
.gitignore
DEVELOPERS
Makefile
Makefile.global.in Introduce --with-ssl={openssl} as a configure option 2021-02-01 19:19:44 +09:00
Makefile.shlib
nls-global.mk