Re: local usage was: Re: using pgsql on my comp only without
От | Mohan |
---|---|
Тема | Re: local usage was: Re: using pgsql on my comp only without |
Дата | |
Msg-id | 404F1358.CD6C00E2@shafika.vetri.com обсуждение исходный текст |
Ответ на | local usage was: Re: using pgsql on my comp only without tcp (<ghaverla@freenet.edmonton.ab.ca>) |
Список | pgsql-novice |
Thanks for the wonderful explanation. I installed postgresql in windows 2000, and when i configured to local host, i got socket error. I installed apache and configured it then it works fine. Is that any webserver required to come out of Socket error? Regards, mohan ghaverla@freenet.edmonton.ab.ca wrote: > On Tue, 9 Mar 2004, Bruno Wolff III wrote: > > On Wed, Mar 10, 2004 at 12:47:16 +1300, > > stm23 <STM23@student.canterbury.ac.nz> wrote: > > >> hi, i am unable to setup my modem on my redhat 8.0 OS, so i > >> don't think i can get TCP access. is it possible to use pgsql > >> entirely on my local computer (i.e creating my own databases & > >> manipulating them on my comp)? > > > > You don't need a modem for tcp access on the same machine that is running > > postgres. There is a loopback interface that is part of the OS that takes > > care of that. You also have (the better) option of using domain sockets > > for connecting to the database from the same host. > > Just getting a little more wordy here. > > I suppose it is possible to set up Linux such that the "localhost" > doesn't exist, but in general if you have networking installed > this thing called localhost will exist. It is also known as the > loopback interface, and is called 'lo' in some instances > (ifconfig). > > A long time ago, people realised that in networking it was always > handy to be able to get to "here". If for no other reason, than > to test network capable software. Most programs happen to know > what $CWD is (Current Working Directory), well localhost is a > similar idea applied to a network. In terms of an IP address, > localhost is 127.0.0.1. > > An example is to telnet to 127.0.0.1. This just lets you login to > your own computer, but instead of the computer thinking you are > logged in at the console, you are logged in over a network > connection. > > So, to use postgres over a local networking connection, we will > have some program establish a connection to 127.0.0.1 on the port > that the PostgreSQL postmaster is listening to (on my machine, > that's 5432). If I later decided to move my database to a > different machine, or move the program to a different machine, all > I need to do is to change the address (and possibly port number), > I don't need to change how the program operates. > > We'll leave sockets and what domain they are in to a different > message. :-) > > Hopefully this is a little "better" description, in the case you > didn't understand the more concise explanation offered earlier. > > Gord > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster
В списке pgsql-novice по дате отправления: