Re: CLOG extension - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: CLOG extension
Date
Msg-id CA+U5nMLvMF-GiP4QPEQWcLYtKCOy06_WiOxV8R1AFyu-wHxfrQ@mail.gmail.com
Whole thread Raw
In response to Re: CLOG extension  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: CLOG extension
List pgsql-hackers
On Thu, May 3, 2012 at 9:56 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Thu, May 3, 2012 at 3:20 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> Your two paragraphs have roughly opposite arguments...
>>
>> Doing it every 32 pages would give you 30 seconds to complete the
>> fsync, if you kicked it off when half way through the previous file -
>> at current maximum rates. So there is utility in doing it in larger
>> chunks.
>
> Maybe, but I'd like to try changing one thing at a time.  If we change
> too much at once, it's likely to be hard to figure out where the
> improvement is coming from.  Moving the task to a background process
> is one improvement; doing it in larger chunks is another.  Those
> deserve independent testing.

You gave a good argument why background pre-allocation wouldn't work
very well if we do it a page at a time. I believe you.

If we do it a file at a time, we can just write the file without
calling it in page by page into the SLRU, as long as we write the WAL
file for it first then we don't need to fsync either of them.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Future In-Core Replication
Next
From: Simon Riggs
Date:
Subject: Re: index-only scans vs. Hot Standby, round two