pgsql: pgstat: fix stats.spec instability on slow machines. - Mailing list pgsql-committers

From Andres Freund
Subject pgsql: pgstat: fix stats.spec instability on slow machines.
Date
Msg-id E1nsu49-000f8q-R9@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
pgstat: fix stats.spec instability on slow machines.

On slow machines the modified test could end up switching the order in which
transactional stats are reported in one session and non-transactional stats in
another session. As stats handling of truncate is implemented as setting
live/dead rows 0, the order in which a truncate's stats changes are applied,
relative to normal stats updates, matters. The handling of stats for truncate
hasn't changed due to shared memory stats, this is longstanding behavior.

We might want to improve truncate's stats handling in the future, but for now
just change the order of forced flushed to make the test stable.

Reported-By: Christoph Berg <myon@debian.org>
Discussion: https://postgr.es/m/YoZf7U/WmfmFYFEx@msg.df7cb.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7fdbdf204920ac279f280d0a8e96946fdaf41aef

Modified Files
--------------
src/test/isolation/expected/stats.out   | 4 ++--
src/test/isolation/expected/stats_1.out | 6 +++---
src/test/isolation/specs/stats.spec     | 3 ++-
3 files changed, 7 insertions(+), 6 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Show 'AS "?column?"' explicitly when it's important.
Next
From: John Naylor
Date:
Subject: pgsql: Remove debug messages from tuplesort_sort_memtuples()