Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Tom Lane wrote:
>> Just from reading the documentation, couldn't the symptom we're seeing
>> arise from autovacuum having hit the table right before
>> brin_summarize_new_values got called?
> Well, I added a autovacuum_enabled=off to that table recently precisely
> because that was my hypothesis. It didn't work though, so it must be
> sometihng else.
Ah. Not having noticed that, I'd locally added a pg_sleep(60) right
before the brin_summarize_new_values call, and failed to reproduce any
problem. So it's not AV doing something, but it sure smells like
something close to that.
Is there a good reason why we need to exercise brin_summarize_new_values
as such here, rather than just doing a manual VACUUM on the table? And
if there is, do we really need to verify its result value? I mean, even
without whatever sort of race condition we're talking about, that expected
result of "5" looks pretty darn phase-of-the-moon-dependent to me.
regards, tom lane