Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Another crack at doing a Win32

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To:
Cc: pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: [HACKERS] Another crack at doing a Win32
Date: 2004-03-05 17:38:13
Message-ID: 4048BB05.6090100@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-hackers-win32pgsql-patches
Tom Lane wrote:

>Perhaps there is a case to be made
>that on all platforms, "-i" should enable or disable only nonlocal
>connections.  Without -i we'd only allow binding to loopback ports
>(either IP4 or IP6).
>
>Aside from keeping the Windows and Unix behaviors similar, this would be
>of some positive benefit for people who use TCP-only clients.  They'd
>not have to remember to set -i anymore, unless they want remote access.
>  
>

I've been caught by this more than once, because I use local JDBC 
clients, so now the first thing I do after initdb is to set tcpip_socket 
to true.

>In response to Andrew's table, here's what I'm visualizing:
>
>* No -i: bind only to loopback addresses (both IP4 and IP6 if available).
>  
>

OK.

>* With -i, but not virtual_host: bind to all available addresses.
>  
>

OK.

>* With -i and virtual_host: bind to specified address(es) only.
>  
>

Can you bind one socket to more than one address? My understanding is 
that it's all (IN_ADDR_ANY or in6_addr_any) or one. In that case with 
this proposal we'd have to force all the communications through that 
interface on Windows. Or would we use multiple sockets (in which case 
there is probably a good case for allowing multiple addresses in 
virtual_host)?

...  (haven't toured this part of the code before) ....

I see what looks like an array of listen sockets, so multiple sockets 
seems the way to go.

>
>I don't have a strong feeling about the case of virtual_host without -i.
>The above says to ignore virtual_host, but maybe we should instead
>ignore the lack of -i and do what virtual_host says.
>
>  
>

I have no strong feelings either.

cheers

andrew

In response to

Responses

pgsql-hackers by date

Next:From: Lawrence E. Smithmier, Jr.Date: 2004-03-05 17:41:24
Subject: Re: [HACKERS] Tablespaces
Previous:From: Dennis HaneyDate: 2004-03-05 17:28:54
Subject: IN joining

pgsql-patches by date

Next:From: John GrayDate: 2004-03-05 19:58:13
Subject: Re: Updated version of contrib/xml (at last)
Previous:From: Tom LaneDate: 2004-03-05 16:58:50
Subject: Re: [HACKERS] Another crack at doing a Win32

pgsql-hackers-win32 by date

Next:From: Lawrence E. Smithmier, Jr.Date: 2004-03-05 17:41:24
Subject: Re: [HACKERS] Tablespaces
Previous:From: Tom LaneDate: 2004-03-05 16:58:50
Subject: Re: [HACKERS] Another crack at doing a Win32

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group