Unix-domain socket support on Windows

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Unix-domain socket support on Windows
Дата
Msg-id 54bde68c-d134-4eb8-5bd3-8af33b72a010@2ndquadrant.com
обсуждение исходный текст
Ответы Re: Unix-domain socket support on Windows  (Heikki Linnakangas <hlinnaka@iki.fi>)
Re: Unix-domain socket support on Windows  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
It works!

(apparently as of Windows 10 version 1803)

Here are some patches to get a discussion rolling.

Basically, it just works, but you need to define your own struct
sockaddr_un.  (This is what configure currently uses as a proxy for
HAVE_UNIX_SOCKETS, so (a) that needs a bit of tweaking, and (b) that is
the reason why builds haven't blown up already.)

But we'll now need to make things work so that binaries with Unix-domain
socket support work on systems without run-time support.  We already did
that exercise with IPv6 support, so some of the framework is already in
place.

Depending on your Windows environment, there might not be a suitable
/tmp directory, so you'll need to specify a directory explicitly using
postgres -k or similar.  This leads to the question what the default for
DEFAULT_PGSOCKET_DIR should be on Windows.  I think it's probably best,
at least for now, to set it so that by default, neither server nor libpq
use Unix sockets unless explicitly selected.  This can be done easily on
the server side by defining DEFAULT_PGSOCKET_DIR as "".  But in libpq, I
don't think the code would handle that correctly everywhere, so it would
need some more analysis and restructuring possibly.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Dmitry Igrishin
Дата:
Сообщение: Re: Small patch to fix build on Windows
Следующее
От: Tom Lane
Дата:
Сообщение: Re: stress test for parallel workers