Re: Connection question - Mailing list pgsql-general

From Bayless Kirtley
Subject Re: Connection question
Date
Msg-id 7688451675F447F3898A7476638125E0@dell2400
Whole thread Raw
In response to Connection question  ("Bayless Kirtley" <bkirt@cox.net>)
Responses Re: Connection question  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
Thanks a lot Craig. The register is connecting through localhost so it's not
that. I
guess I'm not surprised about the Windows thing. I suppose we'll just have
to
live with it then. Fortunately it doesn't happen too often. But as fate
would have it,
most often seems when several customers are standing in line trying to pay.
I tried
initially to get the customer to go Linux instead of Windows but without
much luck.

Thanks again for the thorough explanation.
Bayless

----- Original Message -----
From: "Craig Ringer" <craig@postnewspapers.com.au>
To: "Bayless Kirtley" <bkirt@cox.net>
Cc: "List, Postgres" <pgsql-general@postgresql.org>
Sent: Wednesday, September 01, 2010 10:08 PM
Subject: Re: [GENERAL] Connection question


> On 09/01/2010 11:22 PM, Bayless Kirtley wrote:
>
>> About twice per month, it is necessary to reset the modem and router.
>> This,
>> of course, loses the manager's connection to the DB.
>
> With modern OSes, and many much older ones, it's not "of course" at all.
> Windows XP Pro is quite odd in that it breaks TCP/IP connections when an
> interface goes down and comes back up with the same IP address.
>
> Windows 7 even retains my SSH connections, made over wifi, when suspended
> and resumed! They only break if PuTTY tries to send a packet while the
> interface is still down after resume.
>
> Really, resetting a switch, unplugging a network cable and plugging it
> back in, etc shouldn't break TCP/IP connections, unless it triggers the
> connected host to do a new DHCP request, and the DHCP server hands out a
> different  IP. No decent DHCP server will do that, but some cheap and
> nasty modem/router units don't store DHCP leases across a reboot so they
> "forget" their MAC address to IP address mappings.
>
> Anyway, that's a bit of a tangent, since you're on XP Pro and stuck with
> its rather less than ideal handling of connection loss.
>
>> The problem is, it
>> also
>> seems to break the connection at the cash register. The next time it
>> tries to
>> record a transaction, it gets the error "Unable to write to the backend"
>> or
>> something very close to that.
>
> Is the register application connecting to localhost (127.0.0.1) or to the
> public IP address assigned by DHCP to the register's ethernet interface?
> If the latter, you're being bitten by Windows XP tossing out all TCP/IP
> connections involving that IP.
>
> If you're not sure, the easiest way I can think of to find out is to
> unplug the register from the network, restart the router and see if it can
> still connect. It should be able to.
>
> --
> Craig Ringer


pgsql-general by date:

Previous
From: Thom Brown
Date:
Subject: System catalog changes between 9.0 beta4 and rc1
Next
From: Tom Lane
Date:
Subject: Re: System catalog changes between 9.0 beta4 and rc1