Обсуждение: ANALYZE error

Поиск
Список
Период
Сортировка

ANALYZE error

От
"David Witham"
Дата:
Hi all,

I run a cron job at 2am every night to do an ANALYZE on my whole database:

su - postgres -c 'echo analyze | /usr/bin/psql buns | grep -v ANALYZE'

Its a batch oriented database so there is no user activity on it at this time. The only other job that could be running
isa vacuum I run at 1am but I don't think it would take an hour to run. Occasionally I get this error message from the
analyzejob: 

ERROR:  simple_heap_update: tuple concurrently updated

What does this mean and should I do anything about it?

Thanks,

David Witham
Telephony Platforms Architect
Unidial
Australia



Re: ANALYZE error

От
Tom Lane
Дата:
"David Witham" <davidw@unidial.com.au> writes:
> Occasionally I get this error message from the analyze job:
> ERROR:  simple_heap_update: tuple concurrently updated
> What does this mean and should I do anything about it?

You can get this if two ANALYZEs run in parallel for the same table;
whichever one tries to update pg_statistic second fails with the above
error.  It's moderately annoying, but not dangerous.
        regards, tom lane


Re: ANALYZE error

От
"Iain"
Дата:
>>The only other job that could be running is a vacuum I run at 1am but I
don't think it would take an hour to run.

Famous last words... :-) It should be easy to check this, but I don't know
if that is a likely source of problems anyway.

If I were you I'd just do VACUUM ANALYSE in one comand. It would certainly
eliminate that as a factor.

At this stage you have no idea which table it occurs on, or if it always
happens on the same table, or at the same time, am I right? Failing any more
useful response from those with more internal knowledge you may have to
resort to collecting information and trying to isolate the problem.

It would be a good idea to give all the relevant version numbers too

regards
iain