Re: pg_test_fsync problem

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Vladimir Kokovic <vladimir(dot)kokovic(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_test_fsync problem
Date: 2011-01-25 00:43:02
Message-ID: 201101250043.p0P0h2R11196@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> I wrote:
> > He's complaining that it dies with EINVAL.
>
> > I notice that (1) it's using O_DIRECT even though the printout claims
> > otherwise, and (2) it's writing from a buffer that has no better than
> > char alignment, which is certainly not OK for O_DIRECT. Either one
> > of those could plausibly result in EINVAL ...
>
> Oh, scratch that: the buffer is properly aligned, it's the length that's
> bogus for O_DIRECT. I rather imagine that test_open_sync is meant to be
> writing so many kilobytes, not so many bytes.

Yes, that was a bug in my code that I have fixed with the attached,
applied patch. Thanks for the report.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
/rtmp/fsync.fix text/x-diff 904 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-01-25 00:56:06 Re: Patch to add a primary key using an existing index
Previous Message Bruce Momjian 2011-01-25 00:19:45 Re: Use of O_DIRECT only for open_* sync options