Re: Loaded footgun open_datasync on Windows

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Loaded footgun open_datasync on Windows
Дата
Msg-id 1529503617.2887.26.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Loaded footgun open_datasync on Windows  (Kuntal Ghosh <kuntalghosh.2007@gmail.com>)
Ответы Re: Loaded footgun open_datasync on Windows  (Kuntal Ghosh <kuntalghosh.2007@gmail.com>)
Re: Loaded footgun open_datasync on Windows  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
Kuntal Ghosh wrote:
[pg_test_fsync doesn't use pgwin32_open and hence doesn't respect O_DSYNC]
> On Wed, Jun 6, 2018 at 2:39 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> > On Wed, Jun 6, 2018 at 10:18 AM, Michael Paquier <michael@paquier.xyz> wrote:
> > > On Wed, Jun 06, 2018 at 09:58:34AM +0530, Amit Kapila wrote:
> > > > One another alternative could be that we
> > > > define open as pgwin32_open (for WIN32) wherever we need it.
> > > 
> > > Which is what basically happens on any *nix platform, are you foreseeing
> > > anything bad here?
> > 
> > Nothing apparent, but I think we should try to find out why at the first
> > place this has been made backend specific.
> 
> It seems the "#ifndef FRONTEND" restriction was added around
> pgwin32_open() for building libpq with Visual C++ or Borland C++.  The
> restriction was added in commit 422d4819 to build libpq with VC++[1].
> Later, in commit fd7c3f67e0bc4, the support for Borland C++ was also
> added.
> 
> So, I'm not sure whether removing that restriction will work for all
> front-end modules.

Thanks for the research, and sorry for my long silence.

If I remove the "#ifndef FRONTEND", building with MSVC fails for all
call sites that use the two-argument version of open(2).

If I use the three-argument version throughout, which should be no problem,
PostgreSQL builds just fine with MSVC.

How about checking what the buildfarm thinks about the attached?

Yours,
Laurenz Albe
Вложения

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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: documentation is now XML
Следующее
От: Euler Taveira
Дата:
Сообщение: Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query