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