diff options
| author | Teodor Sigaev | 2017-03-23 16:38:47 +0000 |
|---|---|---|
| committer | Teodor Sigaev | 2017-03-23 16:38:47 +0000 |
| commit | 218f51584d5a9fcdf702bcc7f54b5b65e255c187 (patch) | |
| tree | 6aa7f521be1a389a5cb8de72c58246f2c927e9d4 /src/include | |
| parent | 73561013e5aa44a1669b2cb4351f5e2b29485efb (diff) | |
Reduce page locking in GIN vacuum
GIN vacuum during cleaning posting tree can lock this whole tree for a long
time with by holding LockBufferForCleanup() on root. Patch changes it with
two ways: first, cleanup lock will be taken only if there is an empty page
(which should be deleted) and, second, it tries to lock only subtree, not the
whole posting tree.
Author: Andrey Borodin with minor editorization by me
Reviewed-by: Jeff Davis, me
https://commitfest.postgresql.org/13/896/
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/access/gin_private.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h index 34e7339f055..824cc1c9d89 100644 --- a/src/include/access/gin_private.h +++ b/src/include/access/gin_private.h @@ -471,4 +471,6 @@ ginCompareItemPointers(ItemPointer a, ItemPointer b) return -1; } +extern int ginTraverseLock(Buffer buffer, bool searchMode); + #endif /* GIN_PRIVATE_H */ |
