Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (butnot seq_tup_read)

Поиск
Список
Период
Сортировка
От Kasahara Tatsuhito
Тема Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (butnot seq_tup_read)
Дата
Msg-id CAP0=ZVLB1_gvBgvK5xZ_Ebh6NtmhOS6kMyEyLb-FBDnHD69i9A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (butnot seq_tup_read)  (Masahiko Sawada <masahiko.sawada@2ndquadrant.com>)
Ответы Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (butnot seq_tup_read)  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
Hi,

On Thu, Feb 6, 2020 at 11:01 PM Masahiko Sawada
<masahiko.sawada@2ndquadrant.com> wrote:
>
> On Thu, 6 Feb 2020 at 19:12, Kasahara Tatsuhito
> <kasahara.tatsuhito@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

Вложения

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: [PATCH] Support built control file in PGXS VPATH builds
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Expose lock group leader pid in pg_stat_activity