Re: We really ought to do something about O_DIRECT and data=journalled on ext4

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: We really ought to do something about O_DIRECT and data=journalled on ext4
Дата
Msg-id 4CF68CC0.2080404@agliodbs.com
обсуждение исходный текст
Ответ на Re: We really ought to do something about O_DIRECT and data=journalled on ext4  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: We really ought to do something about O_DIRECT and data=journalled on ext4  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom,

> Well, no, actually it's the same (only) argument.  We'd never consider
> back-patching such a change if our hand weren't being forced by kernel
> changes :-(

I think we have to back-patch the change.  The way it is now, a DBA who
thinks they are doing normal sensible configuration can cause PostgreSQL
to fail to restart.  Imagine this scenario, for example:

1) DBA, using PostgreSQL 8.3, gets worried about possible disk issues
2) DBA changes their single Ext3/4 partition to "data=journal"
3) DBA restarts system
4) PostgreSQL won't start
5) DBA thrashes around for a few hours while the site is down
6) DBA gets fired and the new DBA migrates to some other DBMS.

I simply can't think of *anywhere* we could put the information about
opensync and Linux/Ext which would be prominent enough to avoid the
above scenario.  And per replies, a lot of people have hit this issue
already.

It's a bug and it's our bug.  Back when we added O_DIRECT, we assumed
that support for O_DIRECT/opensync could be determined on an OS/kernel
basis, because that was the information we had.   Now it turns out that
support can vary *by filesystem* and *between remounts*.  We didn't have
any way of knowing different back in 2004, but that doesn't mean we
don't need to fix our mistaken assumption now.

Ideally, we would change our code to test support for O_DIRECT on
startup, rather than at compile time, and backport *that*.

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ana Carolina Brito de Almeida
Дата:
Сообщение: Hypothetical Indexes - PostgreSQL extension - PGCON 2010
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Hypothetical Indexes - PostgreSQL extension - PGCON 2010