Re: Horizontal scalability/sharding

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Horizontal scalability/sharding
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B50F9F235@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: Horizontal scalability/sharding  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Ответы Re: Horizontal scalability/sharding  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
Amit Langote wrote:
> On 2015-09-02 PM 03:25, Amit Kapila wrote:
>> Will it handle deadlocks across different table partitions. Consider
>> a case as below:
>>
>> T1
>> 1. Updates row R1 of T1 on shard S1
>> 2. Updates row R2 of T2 on shard S2
>>
>> T2
>> 1. Updates row R2 of T2 on shard S2
>> 2. Updates row R1 of T1 on shard S1

> As long as shards are processed in the same order in different
> transactions, ISTM, this issue should not arise? I can imagine it becoming
> a concern if parallel shard processing enters the scene. Am I missing
> something?

That would only hold for a single query, right?

If 1. and 2. in the above example come from different queries within one
transaction, you cannot guarantee that shards are processed in the same order.

So T1 and T2 could deadlock.

Yours,
Laurenz Albe

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

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: Horizontal scalability/sharding
Следующее
От: Amit Langote
Дата:
Сообщение: Re: Horizontal scalability/sharding