Re: CompactCheckpointerRequestQueue versus pad bytes

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: CompactCheckpointerRequestQueue versus pad bytes
Date: 2012-07-16 16:04:49
Message-ID: CA+TgmoZCb-5hXNoXk_SUYZN+jFTJ=ySjyfUzq_E9mBPcDFUVng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 16, 2012 at 11:57 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I wrote:
>> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>> So I'm having a hard time understanding under what imaginable set of
>>> circumstances this might break.
>
>> Padding inside RelFileNodeBackend would break it, because
>> ForwardFsyncRequest copies the rnode as a struct. So that's why I'm
>> asking whether we want to establish an explicit requirement that that
>> struct not contain any padding.
>
> BTW, I'd be a lot happier about assuming that bare RelFileNode contains
> no padding, because that's at least got all the fields the same type.
> So that brings us back to the question of why this code is supporting
> fsync requests for local relations in the first place. Couldn't we have
> it ignore those, and then only ship RelFileNode to the checkpointer?

That's an awfully good point. I think that was just sloppy coding on
my part (cf commit debcec7dc31a992703911a9953e299c8d730c778). +1 for
changing it as you suggest.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-07-16 16:08:39 Re: [PERFORM] DELETE vs TRUNCATE explanation
Previous Message Marko Kreen 2012-07-16 15:59:21 Re: [patch] libpq one-row-at-a-time API