pgsql: The GiST scan algorithm uses LSNs to detect concurrent pages spl

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: The GiST scan algorithm uses LSNs to detect concurrent pages spl
Дата
Msg-id E1PII3g-0002Yy-HA@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
The GiST scan algorithm uses LSNs to detect concurrent pages splits, but
temporary indexes are not WAL-logged. We used a constant LSN for temporary
indexes, on the assumption that we don't need to worry about concurrent page
splits in temporary indexes because they're only visible to the current
session. But that assumption is wrong, it's possible to insert rows and
split pages in the same session, while a scan is in progress. For example,
by opening a cursor and fetching some rows, and INSERTing new rows before
fetching some more.

Fix by generating fake increasing LSNs, used in place of real LSNs in
temporary GiST indexes.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=2edc5cd493ce3d7834026970e9d3cd00e203f51a

Modified Files
--------------
src/backend/access/gist/gist.c       |   10 ++++------
src/backend/access/gist/gistutil.c   |   21 +++++++++++++++++++++
src/backend/access/gist/gistvacuum.c |    2 +-
src/include/access/gist_private.h    |    3 ++-
4 files changed, 28 insertions(+), 8 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: The GiST scan algorithm uses LSNs to detect concurrent pages spl
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: The GiST scan algorithm uses LSNs to detect concurrent pages spl