Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (butnot seq_tup_read)
| От | Kyotaro Horiguchi |
|---|---|
| Тема | Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (butnot seq_tup_read) |
| Дата | |
| Msg-id | 20200207.132615.1660289528637942939.horikyota.ntt@gmail.com обсуждение исходный текст |
| Ответ на | Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (butnot seq_tup_read) (Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com>) |
| Ответы |
Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (butnot seq_tup_read)
|
| Список | pgsql-hackers |
At Fri, 7 Feb 2020 12:27:26 +0900, Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com> wrote in
> > 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.
+table_beginscan_tid(Relation rel, Snapshot snapshot,
+ int nkeys, struct ScanKeyData *key)
+{
+ uint32 flags = SO_TYPE_TIDSCAN;
+
+ return rel->rd_tableam->scan_begin(rel, snapshot, nkeys, key, NULL, flags);
It seems that nkeys and key are useless. Since every table_beginscan_*
functions have distinct parameter sets, don't we remove them from
table_beginscan_tid?
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
В списке pgsql-hackers по дате отправления: