Re: pgsql: Attempt to fix unstable regression tests, take 2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Attempt to fix unstable regression tests, take 2
Дата
Msg-id 15012.1585623298@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Attempt to fix unstable regression tests, take 2  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pgsql: Attempt to fix unstable regression tests, take 2  (David Rowley <dgrowley@gmail.com>)
Список pgsql-committers
I wrote:
> Anyway, I remain suspicious that the instability is the fault
> of something in the statistics code, not of autovacuum.

I've been trying to reproduce this by dint of running just the stats_ext
script, over and over in a loop.  I've not had any success on fast
machines, but on a slow one (florican's host) I got this after a few
hundred iterations:

diff -U3 /usr/home/tgl/pgsql/src/test/regress/expected/stats_ext.out
/usr/home/tgl/pgsql/src/test/regress/results/stats_ext.out
--- /usr/home/tgl/pgsql/src/test/regress/expected/stats_ext.out 2020-03-30 21:15:19.749874000 -0400
+++ /usr/home/tgl/pgsql/src/test/regress/results/stats_ext.out  2020-03-30 22:29:04.062103000 -0400
@@ -1172,7 +1172,7 @@
 SELECT * FROM check_estimated_rows('SELECT * FROM mcv_lists WHERE a = 1 AND b = ''1''');
  estimated | actual
 -----------+--------
-         1 |     50
+        50 |     50
 (1 row)

 VACUUM (ANALYZE) mcv_lists;

Now this *IS* autovacuum interference, but it's hardly autovacuum's fault:
the test script is supposing that autovac won't come in before it does a
manual analyze, and that's just unsafe on its face.

I'm thinking that what we ought to do is have this test disable autovac
altogether on its tables, ie
CREATE TABLE ... WITH (autovacuum_enabled = off);

However, I remain suspicious that there's something else going on,
unrelated to autovac.  All the buildfarm cases so far have been
small underestimates, one or two rows, so they look entirely different
from the example above.  Even if autovacuum is firing unexpectedly,
how would it cause such results?

            regards, tom lane



В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Attempt to fix unstable regression tests, take 2
Следующее
От: Amit Kapila
Дата:
Сообщение: pgsql: Avoid calls to RelationGetRelationName() and RelationGetNamespac