pgsql: Fix race condition in GIN posting tree page deletion.
От | Heikki Linnakangas |
---|---|
Тема | pgsql: Fix race condition in GIN posting tree page deletion. |
Дата | |
Msg-id | E1Vesg9-0008LI-36@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Fix race condition in GIN posting tree page deletion. If a page is deleted, and reused for something else, just as a search is following a rightlink to it from its left sibling, the search would continue scanning whatever the new contents of the page are. That could lead to incorrect query results, or even something more curious if the page is reused for a different kind of a page. To fix, modify the search algorithm to lock the next page before releasing the previous one, and refrain from deleting pages from the leftmost branch of the tree. Add a new Concurrency section to the README, explaining why this works. There is a lot more one could say about concurrency in GIN, but that's for another patch. Backpatch to all supported versions. Branch ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/9a45a655977266c5367d658bab8384d8d4c77127 Modified Files -------------- src/backend/access/gin/README | 50 ++++++++++++++++++++++++++++++++++ src/backend/access/gin/ginbtree.c | 53 ++++++++++++++++++++++++++++-------- src/backend/access/gin/ginget.c | 31 ++++++--------------- src/backend/access/gin/ginvacuum.c | 51 +++++++++++++++------------------- src/include/access/gin_private.h | 1 + 5 files changed, 123 insertions(+), 63 deletions(-)
В списке pgsql-committers по дате отправления: