Hi, On Thu, Feb 6, 2020 at 11:01 PM Masahiko Sawada <masahiko.saw...@2ndquadrant.com> wrote: > > On Thu, 6 Feb 2020 at 19:12, Kasahara Tatsuhito > <kasahara.tatsuh...@gmail.com> wrote: > I've tested predicate locking including promotion cases with v3 patch > and it works fine. > > +table_beginscan_tid(Relation rel, Snapshot snapshot, > + int nkeys, struct ScanKeyData *key) > +{ > + uint32 flags = SO_ALLOW_STRAT | SO_ALLOW_SYNC | SO_ALLOW_PAGEMODE; > > IIUC setting SO_ALLOW_STRAT, SO_ALLOW_SYNC and SO_ALLOW_PAGEMODE has > no meaning during tid scan. I think v11 also should be the same. Thanks for your check, and useful advise. I was wondering if I should keep these flags, but I confirmed that I can remove these from TidScan's flags.
> Why did you remove SO_TYPE_TIDSCAN from the previous version patch? I > think it's better to add it and then we can set only SO_TYPE_TIDSCAN > to the scan option of tid scan. Because, currently SO_TYPE_TIDSCAN is not used anywhere. So I thought it might be better to avoid adding a new flag. However, as you said, this flag may be useful for the future tid scan feature (like [1]) Attach v4 patch. I re-added SO_TYPE_TIDSCAN to ScanOptions and table_beginscan_tid. And I remove unnecessary SO_ALLOW_* flags. Best regards, [1] https://www.postgresql.org/message-id/flat/CAKJS1f-%2BJJpm6B_NThUWzFv4007zAjObBXX1CBHE_bH9nOAvSw%40mail.gmail.com#1ae648acdc2df930b19218b6026135d3 -- Tatsuhito Kasahara kasahara.tatsuhito _at_ gmail.com
fix_tidscan_issues_v4.patch
Description: Binary data