]> granicus.if.org Git - postgresql/commit
Fix broken cleanup interlock for GIN pending list.
authorRobert Haas <rhaas@postgresql.org>
Thu, 16 Nov 2017 19:19:27 +0000 (14:19 -0500)
committerRobert Haas <rhaas@postgresql.org>
Thu, 16 Nov 2017 20:26:49 +0000 (15:26 -0500)
commit19648ce553360852ef6a3bd32019d969144e32b6
tree7bc1b1fd1793a4e7c6356712ce038cb1a7b621f2
parent4a15f87d22773ba208c441142ac53ddeb090d1b8
Fix broken cleanup interlock for GIN pending list.

The pending list must (for correctness) always be cleaned up by vacuum, and
should (for the avoidance of surprising behavior) always be cleaned up
by an explicit call to gin_clean_pending_list, but cleanup is optional
when inserting.  The old logic got this backward: cleanup was forced
if (stats == NULL), but that's going to be *false* when vacuuming and
*true* for inserts.

Masahiko Sawada, reviewed by me.

Discussion: http://postgr.es/m/CAD21AoBLUSyiYKnTYtSAbC+F=XDjiaBrOUEGK+zUXdQ8owfPKw@mail.gmail.com
src/backend/access/gin/ginfast.c
src/backend/access/gin/ginvacuum.c
src/include/access/gin_private.h