Re: ATTACH/DETACH PARTITION CONCURRENTLY

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: ATTACH/DETACH PARTITION CONCURRENTLY
Дата
Msg-id bda29028-75ec-08c7-b874-0a9725fb19c6@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: ATTACH/DETACH PARTITION CONCURRENTLY  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: ATTACH/DETACH PARTITION CONCURRENTLY  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Re: ATTACH/DETACH PARTITION CONCURRENTLY  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 2018/11/15 4:27, Robert Haas wrote:
> RelationBuildPartitionDesc doesn't lock the children
> whose relpartbounds it is fetching (!), so unless we're guaranteed to
> have already locked them children earlier for some other reason, we
> could grab the partition bound at this point and then it could change
> again before we get a lock on them.

Hmm, I think that RelationBuildPartitionDesc doesn't need to lock a
partition before fetching its relpartbound, because the latter can't
change if the caller is holding a lock on the parent, which it must be if
we're in RelationBuildPartitionDesc for parent at all.  Am I missing
something?


As Michael pointed out, the first cleanup patch needs to be rebased due to
a recent commit [1].  I did that to see if something we did in that commit
made things worse for your patch, but seems fine.  I had to go and change
things outside RelationBuildPartitionDesc as I rebased, due to the
aforementioned commit, but they're simple changes such as changing List *
arguments of some newly added functions to PartitionBoundSpec **.  Please
find the rebased patches attached with this email.

Thanks,
Amit

[1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=b52b7dc2

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [RFC] Removing "magic" oids
Следующее
От: Kohei KaiGai
Дата:
Сообщение: lbound1 default in buildint2vector/buildoidvector