Re: [ADMIN] Vacuum error on database postgres

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: [ADMIN] Vacuum error on database postgres
Дата
Msg-id 20060915094055.GD1608@svana.org
обсуждение исходный текст
Ответ на Re: [ADMIN] Vacuum error on database postgres  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [ADMIN] Vacuum error on database postgres  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Sep 14, 2006 at 06:25:42PM -0400, Tom Lane wrote:
> Jeff Davis <pgsql@j-davis.com> writes:
> > How would creating a new lock type avoid deadlocks when an ANALYZE is
> > accumulating the locks in random order?
>
> In itself it wouldn't.  Josh Drake sketched the idea in more detail
> later: if there is a lock type used *only* for ANALYZE, then you can do
> ConditionalLockAcquire on it, and if you fail, skip the table on the
> assumption that someone else is already doing what you came to do.

Wouldn't it be useful for ANALYZE to do a conditional lock anyway and
skip if it can't acquire. Especially for the analyse-from-autovacuum
case, perhaps an ANALYSE NOLOCK or whatever.

For stuff run from autovacuum, would it be reasonable for the
automatically run version to just abort if it sees someone doing the
same thing?

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: New version of money type
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Fixed length data types issue