Re: Transaction size

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Transaction size
Дата
Msg-id 11099.1105363826@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Transaction size  (Alban Hertroys <alban@magproductions.nl>)
Ответы Re: Transaction size  (Alban Hertroys <alban@magproductions.nl>)
Список pgsql-general
Alban Hertroys <alban@magproductions.nl> writes:
> Tom Lane wrote:
>> Alban Hertroys <alban@magproductions.nl> writes:
>>> As they're inserts, and therefore not even touching the same data, I'm
>>> quite certain it's not some kind of row locking issue (does that even
>>> happen at all with MVCC?).
>>
>> I'm not.  In particular this could be a foreign key locking issue ---
>> does the target table have foreign keys, and if so could inserts from
>> different transactions be referencing the same master row?

> It does have a reference to a table with statusses, but those are rather
> static. I suppose an integrity check is comparable to doing a select
> with respect to locking strategies? (Meaning that it wouldn't be the
> cause of my problem).

No, unfortunately it's more like a SELECT FOR UPDATE and it does take a
lock on the referenced row (with an eye to ensuring that the referenced
row can't go away before the new referencing row is committed).
I suspect this is indeed the cause of your problem.

            regards, tom lane

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

Предыдущее
От: John Sidney-Woollett
Дата:
Сообщение: Re: ORDER BY in UNION query
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ORDER BY in UNION query