Re: Debugging deadlocks

Поиск
Список
Период
Сортировка
От Guy Rouillier
Тема Re: Debugging deadlocks
Дата
Msg-id CC1CF380F4D70844B01D45982E671B2348E7AB@mtxexch01.add0.masergy.com
обсуждение исходный текст
Ответ на Debugging deadlocks  ("Guy Rouillier" <guyr@masergy.com>)
Список pgsql-general
frank@joerdens.de wrote:
> On Sun, Mar 27, 2005 at 12:54:28AM -0600, Guy Rouillier wrote: []
>> The service_plane table is a reference table, i.e., a fixed set of
>> values used only to validate foreign keys.  So the code doesn't have
>> any update statements on that table.
>
> And idea that just came up around here that sounds like a pretty neat
> workaround, which we're gonna try, is to drop the foreign key
> constraints, and just use a check constraint for the allowed values.
> If the cardinality of the reference table is small, this is much
> faster than using foreign keys and solves your problem.  With the
> drawback that if you update the reference table (if you keep it), you
> mustn't forget to also update the check constraints in more than one
> place.

Frank and Bruno, thanks for the idea.  I'm going to give this a try.  I
tried the INITIALLY DEFERRED and I'm getting some strange duplicate key
errors.  This sounds like a better idea in this scenario, as our
reference table only has a dozen unique values.

--
Guy Rouillier


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

Предыдущее
От: "Guy Rouillier"
Дата:
Сообщение: Re: Recovering real disk space
Следующее
От: "Sim Zacks"
Дата:
Сообщение: Re: [Fwd: [webmaster] in Search of free hosting with PostgreSQL]