From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chapman Flack <chap@anastigmatix.net>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: [HACKERS] AdvanceXLInsertBuffer vs. WAL segment compressibility
Date: Mon, 26 Mar 2018 12:34:26 -0400
Message-ID: <30464.1522082066@sss.pgh.pa.us> (raw)
In-Reply-To: <5AB8D9C2.2010208@anastigmatix.net>
References: <d190140f-b6e8-5e2f-c663-c8f9617da18e@iki.fi>
<CAB7nPqQr1D3gjx8CmHYQREidG2eeGHzx2yQ97B3t2L99GE=+kQ@mail.gmail.com>
<5A92F0C0.7070706@anastigmatix.net>
<C0523BD1-485D-48B5-982E-8D63E2D001B7@yesql.se>
<5AADB130.2020206@anastigmatix.net>
<4597.1521338981@sss.pgh.pa.us>
<46FFB930-B0F3-400A-85ED-D9948C97FADF@yesql.se>
<5AAEE00E.9050503@anastigmatix.net>
<21C25ED8-4ED8-4AD4-B551-3E3987ECB18F@yesql.se>
<5AAEFF11.3070903@anastigmatix.net>
<20180326032731.GM24540@tamriel.snowman.net>
<5AB8D9C2.2010208@anastigmatix.net>
Chapman Flack <chap@anastigmatix.net> writes:
> On 03/25/18 23:27, Stephen Frost wrote:
>> AdvanceXLInsertBuffer() does quite a bit, so I'm a bit surprised to see
>> this simply removing that call, you're confident there's nothing done
>> which still needs doing..?
> My belief from looking at the code was that AdvanceXLInsertBuffer() is among
> the things GetXLogBuffer() does, so calling both would result in two calls
> to the former (which I don't believe would hurt, it would only
> do enough work the second time to determine it had already been done).
If that's the argument, why is the WALInsertLockUpdateInsertingAt(CurrPos)
call still there? GetXLogBuffer() would do that too.
In any case, the new comment seems very poorly written, as it fails to
explain what's going on, and the reference to a function that is not
actually called from the vicinity of the comment doesn't help. I'd
suggest something like "GetXLogBuffer() will fetch and initialize the
next WAL page for us. But it initializes the page header to nonzero,
which is undesirable because X, so we then reset the header to zero".
It might also be worth explaining how you know that the new page's
header is short not long.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, chap@anastigmatix.net, pgsql-hackers@lists.postgresql.org
Subject: Re: [HACKERS] AdvanceXLInsertBuffer vs. WAL segment compressibility
In-Reply-To: <30464.1522082066@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox