Skip to content

2.27.0.0-b347

@jaki jaki tagged this 17 Jul 23:47
Summary:
Catalog Read Request shows an incorrect number for the first query of a
connection because it counts catalog requests made by prefetching at
connection startup.  Fix by refreshing stats before entering the
postgres main loop, which is after catalog cache prefetching.

Bear in mind that the first and second time a new query is run, the
first query may still have more catalog read requests than the second
because it needs to pull additional catalog entries that are not yet
cached.  That is different from catalog cache prefetching, which bulk
loads many catalog entries at the start of a connection.

Jira: DB-17629

Test Plan:
On Almalinux 8:

    bin/ysqlsh -c 'create table abc (i int)'
    diff \
      <(diff \
          <(bin/ysqlsh -c 'explain (analyze, dist, timing off, summary off) select * from abc') \
          <(bin/ysqlsh -c 'select' -c 'explain (analyze, dist, timing off, summary off) select * from abc')) \
      - <<EOT
    0a1,3
    > --
    > (1 row)
    >
    EOT

Backport-through: 2.20

Reviewers: kramanathan

Reviewed By: kramanathan

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D45404
Assets 2
Loading