Thread

  1. stale statistics on postgres 14

    Jaime Casanova <jcasanov@systemguards.com.ec> — 2022-02-28T22:52:45Z

    Hi everyone,
    
    I have been doing some tests on a little server (at least compared to
    some others around). It have 128 cores (64 physical), 128GB of RAM and
    against my will a 4-disk (10k RPM) RAID5.
    
    I have been using hammerdb testing from 9.6 to 14, currently on windows
    10. Obviously, I have been recording changes on performance.
    
    Hammerdb results shows 2 numbers, NOPM and TPM the second one is
    calculated using statistics.
    
    Sadly, on 14 I saw a lowered number of TPM while NOPM kept on the
    average (at least is the average since 11).
    
    The reason that on 14 the TPM number dropped is because it's based 
    on the statistics[1] which of course are stalled[2].
    
    I consider this a regression because no other postgres version had 
    this problem on the same machine and the same OS. Anything I can do to
    track what caused this regression?
    
    [1] Query from hammerdb to get TPM number:
    select sum(xact_commit + xact_rollback) 
      from pg_stat_database
    
    [2] Message from the log, saying what is obvious
    LOG:  00000: using stale statistics instead of current ones because
    stats collector is not responding
    
    -- 
    Jaime Casanova
    Director de Servicios Profesionales
    SystemGuards - Consultores de PostgreSQL