Re: [WIP PATCH] Index scan offset optimisation using visibility map

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michail Nikolaev <michail(dot)nikolaev(at)gmail(dot)com>, Tels <nospam-pg-abuse(at)bloodgate(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [WIP PATCH] Index scan offset optimisation using visibility map
Date: 2018-03-13 06:37:22
Message-ID: FCDDD40B-E31D-4CFC-AE48-D7CF466E0601@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom, thanks for inspecting the patch.
There's so many problems that slipped from my attention... But one thing that bothers me most is the problem with predicate locking

> 13 марта 2018 г., в 0:55, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> написал(а):
>
> The PredicateLockPage call also troubles me quite a bit, not only from
> a modularity standpoint but because that implies a somewhat-user-visible
> behavioral change when this optimization activates. People who are using
> serializable mode are not going to find it to be an improvement if their
> queries fail and need retries a lot more often than they did before.
> I don't know if that problem is bad enough that we should disable skipping
> when serializable mode is active, but it's something to think about.

Users already have to expect this if the scan turns into IoS somewhat accidentally. There will be page predicate locks with possible false positive conflicts. I'm not sure that keeping existing tuple-level lock granularity is necessary.

I think we can do it if we introduce PredicateLockTuple that do not require tuple's xmin, that takes only tid and does not look into heap. But this tweak seems outside of the patch scope and I believe it's better avoid messing with SSI internals without strong reason.

Best regards, Andrey Borodin.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-03-13 06:46:53 Re: PATCH: Configurable file mode mask
Previous Message Michael Paquier 2018-03-13 06:31:13 Re: PATCH: Unlogged tables re-initialization tests