Re: Direct I/O

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Direct I/O
Дата
Msg-id CA+hUKGKkONP3UL2gQM6E3zz_4voH-iix+DtsYOuaWzBSfxq5YA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Direct I/O  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Direct I/O  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, Apr 16, 2023 at 6:19 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> So apparently, the fact that you even get a warning about the
> alignment not being honored is something OpenBSD patched in
> after-the-fact; it's not there in genuine vintage gcc.

Ah, that is an interesting discovery, and indeed kills the configure check idea.

> At this point I agree with Andres that it'd be good enough to
> silence the warning by getting rid of these alignment pragmas
> when the platform lacks O_DIRECT.

Hmm.  My preferred choice would be: accept Mikael's kind offer to
upgrade curculio to a live version, forget about GCC 4.2.1 forever,
and do nothing.  It is a dead parrot.

But if we really want to do something about this, my next preferred
option would be to modify c.h's test to add more conditions, here:

/* GCC, Sunpro and XLC support aligned, packed and noreturn */
#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
#define pg_attribute_aligned(a) __attribute__((aligned(a)))
...

Full GCC support including stack objects actually began in 4.6, it
seems.  It might require a bit of research because the GCC-workalikes
including Clang also claim to be certain versions of GCC (for example
I think Clang 7 would be excluded if you excluded GCC 4.2, even though
this particular thing apparently worked fine in Clang 7).  That's my
best idea, ie to actually model the feature history accurately, if we
are suspending disbelief and pretending that it is a reasonable
target.



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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: segfault tied to "IS JSON predicate" commit
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Direct I/O