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

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: kasahara(dot)tatsuhito(at)gmail(dot)com
Cc: masahiko(dot)sawada(at)2ndquadrant(dot)com, masao(dot)fujii(at)oss(dot)nttdata(dot)com, andres(at)anarazel(dot)de, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (but not seq_tup_read)
Date: 2020-02-07 04:26:15
Message-ID: 20200207.132615.1660289528637942939.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Fri, 7 Feb 2020 12:27:26 +0900, Kasahara Tatsuhito <kasahara(dot)tatsuhito(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kasahara Tatsuhito 2020-02-07 06:07:51 Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (but not seq_tup_read)
Previous Message Justin Pryzby 2020-02-07 04:17:06 Re: typos in comments and user docs