stale statistics on postgres 14

From: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
To: pgsql-hackers(at)postgresql(dot)org
Subject: stale statistics on postgres 14
Date: 2022-02-28 22:52:45
Message-ID: Yh1SPVWQRrUceC+S@ahch-to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Browse pgsql-hackers by date

  From Date Subject
Next Message Cary Huang 2022-02-28 22:56:31 Re: [PATCH] add relation and block-level filtering to pg_waldump
Previous Message Tom Lane 2022-02-28 22:48:50 Re: real/float example for testlibpq3