Re: Relation bulk write facility - Mailing list pgsql-hackers

From Noah Misch
Subject Re: Relation bulk write facility
Date
Msg-id 20240703034131.e1.nmisch@google.com
Whole thread Raw
In response to Re: Relation bulk write facility  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
On Tue, Jul 02, 2024 at 02:42:50PM +0300, Heikki Linnakangas wrote:
> On 02/07/2024 02:24, Noah Misch wrote:
> > On Tue, Jul 02, 2024 at 12:53:05AM +0300, Heikki Linnakangas wrote:

> log_newpage_range() loads the pages to the buffer
> cache and dirties them. That kinds of sucks actually, I wish it didn't need
> to dirty the buffers.

Agreed.

> > > Fortunately, fsync() on a file that's already flushed to disk is pretty
> > > cheap.
> > 
> > Yep.  I'm more concerned about future readers wondering why the function is
> > using LSNs to decide what to do about data that doesn't appear in WAL.  A
> > comment could be another way to fix that, though.
> 
> Agreed, this is all very subtle, and deserves a good comment. What do you
> think of the attached?

Looks good.  Thanks.  pgindent doesn't preserve all your indentation, but it
doesn't make things objectionable, either.



pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Removing unneeded self joins
Next
From: Michael Paquier
Date:
Subject: Re: Cleaning up perl code