Re: Should use MERGE use BulkInsertState ?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Should use MERGE use BulkInsertState ?
Дата
Msg-id 202205111523.rhf6veb6i6c5@alvherre.pgsql
обсуждение исходный текст
Ответ на Should use MERGE use BulkInsertState ?  (Justin Pryzby <pryzby@telsasoft.com>)
Ответы Re: Should use MERGE use BulkInsertState ?  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-hackers
On 2022-May-11, Justin Pryzby wrote:

> Should it use it ?
> 
> It occured to me to ask when reading Bruce's release notes, which say:
> | [MERGE] is similar to INSERT ... ON CONFLICT but more batch-oriented.
> 
> Currently, INSERT *never* uses bistate - even INSERT SELECT.
> 
> INSERTing 10k tuples will dirty 10k buffers - not limited to the size of a
> strategy/ring buffer.  Currently, MERGE will do the same.

As I understand it, the point of using a ring is to throttle performance
for bulk operations such as vacuum.  I'm not sure why we would want to
throttle either MERGE or INSERT; it seems to me that we should want them
to go as fast as possible.

If MERGE were to use a ring buffer, why wouldn't UPDATE do the same?
There are some comments to that effect in src/backend/buffer/README --
they do mention UPDATE/DELETE and not INSERT.  It seems to me that these
three commands (MERGE/UPDATE/DELETE) should be handled in similar ways,
so I don't think we need to consider lack of MERGE using a ring buffer
an open item for pg15.

COPY uses a ring buffer too.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: First draft of the PG 15 release notes
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: First draft of the PG 15 release notes