Re: Should use MERGE use BulkInsertState ? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Should use MERGE use BulkInsertState ?
Date
Msg-id CA+TgmobC6RD2N8kbPPTvATpUY1kisY2wJLh2jsg=HGoCp2RiXw@mail.gmail.com
Whole thread Raw
List pgsql-hackers
On Wed, May 11, 2022 at 12:48 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
> The point of the ring/strategy buffer is to avoid a seq scan/vacuum/COPY
> clobbering the entire buffer cache when processing a table larger than
> shared_buffers.
>
> It also makes backends doing bulk operations responsible for their own writes,
> rather than leaving other backends to clean up all their dirty buffers.

Right. It's not just about how fast individual operations go: dirtying
all of shared_buffers is faster *for you* but you've imposed a
distributed cost on everyone else on the system, which isn't great.

That said, I'm not really sure what the proper handling is in this
specific case. I guess we should try our best to have it be symmetric
with other similar cases, but questions have been raised repeatedly
about how well the ring buffer stuff actually works.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: First draft of the PG 15 release notes
Next
From: Robert Haas
Date:
Subject: Re: Comments on Custom RMGRs