postgresql/src
Michael Paquier 56b662523f Fix ordering issue with WAL operations in GIN fast insert path
Contrary to what is documented in src/backend/access/transam/README,
ginHeapTupleFastInsert() had a few ordering issues with the way it does
its WAL operations when inserting items in its fast path.

First, when using a separate list, XLogBeginInsert() was being always
called before START_CRIT_SECTION(), and in this case a second thing was
wrong when merging lists, as an exclusive lock was taken on the tail
page *before* calling XLogBeginInsert().  Finally, when inserting items
into a tail page, the order of XLogBeginInsert() and
START_CRIT_SECTION() was reversed.  This commit addresses all these
issues by moving the calls of XLogBeginInsert() after all the pages
logged are locked and pinned, within a critical section.

Author:  Matthias van de Meent, Zhang Mingli
Discussion: https://postgr.es/m/CAEze2WhL8uLMqynnnCu1LAPwxD5RKEo0nHV+eXGg_N6ELU88HQ@mail.gmail.com
2022-10-13 09:31:57 +09:00
..
backend Fix ordering issue with WAL operations in GIN fast insert path 2022-10-13 09:31:57 +09:00
bin meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
common meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
fe_utils meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
include Reduce xlog.h inclusion footprint 2022-10-12 09:47:11 +02:00
interfaces Remove unnecessary uses of Abs() 2022-10-07 13:29:33 +02:00
makefiles autoconf: Rely on ar supporting index creation 2022-10-07 11:53:39 -07:00
pl meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
port meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
template Move darwin sysroot determination into separate file 2022-09-01 16:54:19 -07:00
test Fix outdated code reference 2022-10-12 09:54:02 +02:00
timezone meson: Add windows resource files 2022-10-05 09:56:05 -07:00
tools Add meson.build to version_stamp.pl 2022-10-12 07:06:10 +02:00
tutorial Update copyright for 2022 2022-01-07 19:04:57 -05:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in autoconf: Rely on ar supporting index creation 2022-10-07 11:53:39 -07:00
Makefile.shlib autoconf: Rely on ar supporting index creation 2022-10-07 11:53:39 -07:00
meson.build meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00