postgresql/contrib
Robert Haas 8fd5aa76c3 amcheck: Fix verify_heapam for tuples where xmin or xmax is 0.
In such cases, get_xid_status() doesn't set its output parameter (the
third argument), so we shouldn't fall through to code which will test
the value of that parameter. There are five existing calls to
get_xid_status(), three of which seem to already handle this case
properly.  This commit tries to fix the other two.

If we're checking xmin and find that it is invalid (i.e. 0) just
report that as corruption, similar to what's already done in the
three cases that seem correct. If we're checking xmax and find
that's invalid, that's fine: it just means that the tuple hasn't
been updated or deleted.

Thanks to Andres Freund and valgrind for finding this problem, and
also to Andres for having a look at the patch.  This bug seems to go
all the way back to where verify_heapam was first introduced, but
wasn't detected until recently, possibly because of the new test cases
added for update chain verification.  Back-patch to v14, where this
code showed up.

Discussion: http://postgr.es/m/CA+TgmoZAYzQZqyUparXy_ks3OEOfLD9-bEXt8N-2tS1qghX9gQ@mail.gmail.com
2023-03-24 11:06:45 -04:00
..
adminpack
amcheck amcheck: Fix verify_heapam for tuples where xmin or xmax is 0. 2023-03-24 11:06:45 -04:00
auth_delay
auto_explain Fix EXPLAIN ANALYZE for async-capable nodes. 2021-05-12 14:00:00 +09:00
bloom Replace RelationOpenSmgr() with RelationGetSmgr(). 2022-11-17 16:54:30 -05:00
bool_plperl
btree_gin Fix failure of btree_gin indexscans with "char" type and </<= operators. 2021-08-10 18:10:30 -04:00
btree_gist Fix results of index-only scans on btree_gist char(N) indexes. 2022-01-08 14:54:39 -05:00
citext CREATE INDEX: use the original userid for more ACL checks. 2022-06-25 09:07:44 -07:00
cube
dblink postgres_fdw: Fix unexpected reporting of empty message. 2021-12-03 17:37:08 +09:00
dict_int
dict_xsyn
earthdistance
file_fdw
fuzzystrmatch
hstore
hstore_plperl Make contrib modules' installation scripts more secure. 2020-08-10 10:44:42 -04:00
hstore_plpython
intagg
intarray Remove extraneous newlines added by perl copyright patch 2021-05-07 11:37:37 -04:00
isn
jsonb_plperl
jsonb_plpython
lo
ltree Fix default signature length for gist_ltree_ops 2022-03-16 11:41:30 +03:00
ltree_plpython
oid2name Add a copyright notice to perl files lacking one. 2021-05-07 10:56:14 -04:00
old_snapshot Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
pageinspect pageinspect: Fix crash with gist_page_items() 2023-03-02 14:03:21 +09:00
passwordcheck Revert error handling improvements for cryptohashes 2022-01-14 11:25:39 +09:00
pg_buffercache
pg_freespacemap
pg_prewarm Replace RelationOpenSmgr() with RelationGetSmgr(). 2022-11-17 16:54:30 -05:00
pg_stat_statements pg_stat_statements: fetch stmt location/length before it disappears. 2022-11-01 12:48:01 -04:00
pg_surgery
pg_trgm Fix misbehavior in contrib/pg_trgm with an unsatisfiable regex. 2023-03-11 12:15:41 -05:00
pg_visibility Replace RelationOpenSmgr() with RelationGetSmgr(). 2022-11-17 16:54:30 -05:00
pgcrypto Clean up assorted failures under clang's -fsanitize=undefined checks. 2022-03-03 18:13:24 -05:00
pgrowlocks
pgstattuple
postgres_fdw Harden postgres_fdw tests against unexpected cache flushes. 2023-02-27 16:29:51 -05:00
seg Fix contrib/seg to be more wary of long input numbers. 2022-12-21 17:51:50 -05:00
sepgsql Centralize the logic for protective copying of utility statements. 2021-06-18 11:22:58 -04:00
spi
sslinfo
start-scripts
tablefunc
tcn
test_decoding Fix executing invalidation messages generated by subtransactions during decoding. 2022-10-21 09:52:44 +05:30
tsm_system_rows
tsm_system_time
unaccent Update Unicode data to CLDR 39 2021-04-08 08:28:03 +02:00
uuid-ossp Reject bogus output from uuid_create(3). 2022-09-09 12:41:36 -04:00
vacuumlo Add a copyright notice to perl files lacking one. 2021-05-07 10:56:14 -04:00
xml2
contrib-global.mk
Makefile
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.