Re: Parallel Inserts in CREATE TABLE AS

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Parallel Inserts in CREATE TABLE AS
Дата
Msg-id CALj2ACXskhY58=Fh8TioKLL1DXYkKdyEyWFYykf-6aLJgJ2qmQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Parallel Inserts in CREATE TABLE AS  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Parallel Inserts in CREATE TABLE AS  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
On Thu, May 27, 2021 at 9:43 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
> > I have read it but I think we should try to ensure practically what is
> > happening because it is possible that first time worker checked in FSM
> > without taking relation extension lock, it didn't find any free page,
> > and then when it tried to acquire the conditional lock, it got the
> > same and just extended the relation by one block. So, in such a case
> > it won't be able to use the newly added pages by another worker. I am
> > not sure any such thing is happening here but I think it is better to
> > verify it in some way. Also, I am not sure if just getting the info
> > about the relation extension lock is sufficient?
> >
>
> One idea to find this out could be that we have three counters for
> each worker which counts the number of times each worker extended the
> relation in bulk, the number of times each worker extended the
> relation by one block, the number of times each worker gets the page
> from FSM. It might be possible that with this we will be able to
> figure out why there is a difference between your and Hou-San's
> results.

Yeah, that helps. And also, the time spent in
LockRelationForExtension, ConditionalLockRelationForExtension,
GetPageWithFreeSpace and RelationAddExtraBlocks too can give some
insight.

My plan is to have a patch with above info added in (which I will
share it here so that others can test and see the results too) and run
the "case 4" where there's a regression seen on my system.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: Skip partition tuple routing with constant partition key
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: Skipping logical replication transactions on subscriber side