Re: Relation bulk write facility

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Relation bulk write facility
Date: 2023-12-14 13:02:01
Message-ID: 37a293ef-b296-48b2-ad7f-3dcc66e1949b@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Melanie just reminded about an older thread about this same thing:
https://www.postgresql.org/message-id/CAAKRu_ZQEpk6Q1WtNLgfXBdCmdU5xN_w0boVO6faO_Ax%2Bckjig%40mail.gmail.com.
I had completely forgotten about that.

Melanie's patches in that thread implemented the same optimization of
avoiding the fsync() if no checkpoint has happened during the index
build. My patch here also implements batching the WAL records of
multiple blocks, which was not part of those older patches. OTOH, those
patches included an additional optimization of not bypassing the shared
buffer cache if the index is small. That seems sensible too.

In this new patch, I subconsciously implemented an API close to what I
suggested at the end of that old thread.

So I'd like to continue this effort based on this new patch. We can add
the bypass-buffer-cache optimization later on top of this. With the new
API that this introduces, it should be an isolated change to the
implementation, with no changes required to the callers.

--
Heikki Linnakangas
Neon (https://neon.tech)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Federico 2023-12-14 13:21:24 Re: Improve upcasting for INT range and multi range types
Previous Message Jelte Fennema-Nio 2023-12-14 12:57:47 Re: [EXTERNAL] Re: Add non-blocking version of PQcancel