Re: Passing CopyMultiInsertInfo structure toCopyMultiInsertInfoNextFreeSlot()

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Passing CopyMultiInsertInfo structure toCopyMultiInsertInfoNextFreeSlot()
Дата
Msg-id 20190518004947.pcrksmbetlisz64y@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()  (Ashutosh Sharma <ashu.coek88@gmail.com>)
Ответы Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()  (David Rowley <david.rowley@2ndquadrant.com>)
Список pgsql-hackers
Hi,

On 2019-05-18 06:14:15 +0530, Ashutosh Sharma wrote:
> On Sat, May 18, 2019 at 1:34 AM Andres Freund <andres@anarazel.de> wrote:
> Considering that we can have MAX_BUFFERED_TUPLES slots in each multi-insert
> buffer and we do flush the buffer after MAX_BUFFERED_TUPLES tuples have
> been stored, it seems unlikely that we would ever come across a situation
> where one partition would need to reuse the slot of another partition.

I don't think this is right. Obviously it'd not be without a bit more
changes, but we definitely *should* try to reuse slots from other
partitions (including the root partition if compatible). Creating them
isn't that cheap, compared to putting slots onto a freelist for a wihle.


> Also, from a consistency point, it seems the caller doesn't need to know
> > whether all the necessary information is in the ResultRelInfo and not in
> > CopyMultiInsertInfo for *some* of the CopyMultiInsertInfo functions.
> >
> >
> I actually feel that the function name itself is not correct here, it
> appears to be confusing and inconsistent considering the kind of work that
> it is doing. I think, the function name should have been CopyMultiInsert
> *Buffer*NextFreeSlot() instead of CopyMultiInsert*Info*NextFreeSlot(). What
> do you think, Andres, David, Alvaro ?

Unless somebody else presses back hard against doing so *soon*, I'm
going to close this open issue. I don't think it's worth spending
further time arguing about a few characters.

Greetings,

Andres Freund



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

Предыдущее
От: Ashutosh Sharma
Дата:
Сообщение: Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Calling PrepareTempTablespaces in BufFileCreateTemp