Go to file
Noah Misch a07e03fd8f Fix data loss at inplace update after heap_update().
As previously-added tests demonstrated, heap_inplace_update() could
instead update an unrelated tuple of the same catalog.  It could lose
the update.  Losing relhasindex=t was a source of index corruption.
Inplace-updating commands like VACUUM will now wait for heap_update()
commands like GRANT TABLE and GRANT DATABASE.  That isn't ideal, but a
long-running GRANT already hurts VACUUM progress more just by keeping an
XID running.  The VACUUM will behave like a DELETE or UPDATE waiting for
the uncommitted change.

For implementation details, start at the systable_inplace_update_begin()
header comment and README.tuplock.  Back-patch to v12 (all supported
versions).  In back branches, retain a deprecated heap_inplace_update(),
for extensions.

Reported by Smolkin Grigory.  Reviewed by Nitin Motiani, (in earlier
versions) Heikki Linnakangas, and (in earlier versions) Alexander
Lakhin.

Discussion: https://postgr.es/m/CAMp+ueZQz3yDk7qg42hk6-9gxniYbp-=bG2mgqecErqR5gGGOA@mail.gmail.com
2024-09-24 15:25:18 -07:00
.github
config
contrib Neaten up our choices of SQLSTATEs for XML-related errors. 2024-09-24 12:59:56 -04:00
doc Add ONLY support for VACUUM and ANALYZE 2024-09-24 18:03:40 +12:00
src Fix data loss at inplace update after heap_update(). 2024-09-24 15:25:18 -07:00
.cirrus.star
.cirrus.tasks.yml Add PG_TEST_PG_COMBINEBACKUP_MODE to CI tasks 2024-09-10 16:30:38 +02:00
.cirrus.yml
.dir-locals.el
.editorconfig
.git-blame-ignore-revs Add commit 7229ebe011 to .git-blame-ignore-revs. 2024-09-14 20:17:30 +02:00
.gitattributes
.gitignore
aclocal.m4
configure
configure.ac
COPYRIGHT
GNUmakefile.in
HISTORY
Makefile
meson_options.txt
meson.build Improve meson's detection of perl build flags 2024-09-14 10:26:25 -04:00
README.md

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.

Copyright and license information can be found in the file COPYRIGHT.

General documentation about this version of PostgreSQL can be found at https://www.postgresql.org/docs/devel/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/devel/installation.html.

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