Re: What happened to open_sync_without_odirect?

Lists: pgsql-hackers
From: Josh Berkus <josh(at)agliodbs(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: What happened to open_sync_without_odirect?
Date: 2011-01-15 22:15:53
Message-ID: 4D321C99.9060405@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Last I remember, we were going to add this as an option. But I don't
see a patch in the queue. Am I missing it? Was I supposed to write it?

--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: What happened to open_sync_without_odirect?
Date: 2011-01-16 00:30:20
Message-ID: 201101160030.p0G0UKc15365@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Josh Berkus wrote:
> Last I remember, we were going to add this as an option. But I don't
> see a patch in the queue. Am I missing it? Was I supposed to write it?

I don't know, but let me add that I am confused how this would look to
users. In many cases, kernels don't even support O_DIRECT, so what
would we do to specify this? What about just auto-disabling O_DIRECT if
the filesystem does not support it; maybe issue a log message about it.

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

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


From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: What happened to open_sync_without_odirect?
Date: 2011-01-16 20:12:11
Message-ID: 4D33511B.6020607@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 1/15/11 4:30 PM, Bruce Momjian wrote:
> Josh Berkus wrote:
>> Last I remember, we were going to add this as an option. But I don't
>> see a patch in the queue. Am I missing it? Was I supposed to write it?
>
> I don't know, but let me add that I am confused how this would look to
> users. In many cases, kernels don't even support O_DIRECT, so what
> would we do to specify this? What about just auto-disabling O_DIRECT if
> the filesystem does not support it; maybe issue a log message about it.

Yes, you *are* confused. The problem isn't auto-disabling, we already
do that. The problem is *auto-enabling*; ages ago we made the
assumption that if o_sync was supported, so was o_direct. We've now
found out that's not true on all platforms.

Also, test results show that even when supported, o_direct isn't
necessarily a win. Hence, the additional fsync_method options.

--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: What happened to open_sync_without_odirect?
Date: 2011-01-17 18:07:42
Message-ID: 201101171807.p0HI7gd21172@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Josh Berkus wrote:
> On 1/15/11 4:30 PM, Bruce Momjian wrote:
> > Josh Berkus wrote:
> >> Last I remember, we were going to add this as an option. But I don't
> >> see a patch in the queue. Am I missing it? Was I supposed to write it?
> >
> > I don't know, but let me add that I am confused how this would look to
> > users. In many cases, kernels don't even support O_DIRECT, so what
> > would we do to specify this? What about just auto-disabling O_DIRECT if
> > the filesystem does not support it; maybe issue a log message about it.
>
> Yes, you *are* confused. The problem isn't auto-disabling, we already
> do that. The problem is *auto-enabling*; ages ago we made the
> assumption that if o_sync was supported, so was o_direct. We've now
> found out that's not true on all platforms.
>
> Also, test results show that even when supported, o_direct isn't
> necessarily a win. Hence, the additional fsync_method options.

I think it would be clear if we did not use o_direct for open_*sync, but
only for open_*sync_direct, so there was no auto-direct anything --- you
had to ask for it, and if we don't support it, you get an error. Right
now people aren't sure what they are getting.

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

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