Thread: PostgreSQL under Cygwin...
I am running (or attempting to run) PostgreSQL 7.2 under Cygwin under WindowsXP. I have the latest version of everything for Cygwin, I have the ipc-daemon service running, and I installed postmaster as a service using the command: cygrunsrv --install PostgreSQL --path /bin/postmaster --args "-D /usr/local/share/postdb" --user Randy --dep ipc-daemon --termsig INT This service starts fine too... Then I tried to create a new database: createdb Randy. createdb fails with the message: psql: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. createdb: database creation failed ...and the PostgreSQL service stops. I tried: psql template0 ...and got basically the same message, and the service stopped again. So... Any ideas? Any at all would be greatly appreciated. Thanks, Randy Widell
try adding the -h <hostname> argument to createdb and psql or set the PGHOST environment variable. I don't think this was required with 7.1 but seems to be with 7.2 "Randy Widell" <nospam_rwidell@bellsouth.net_mapson> wrote in message news:ksrg8.43009$sH1.2880833@e3500-atl2.usenetserver.com... > I am running (or attempting to run) PostgreSQL 7.2 under Cygwin > under WindowsXP. I have the latest version of everything for Cygwin, I have > the ipc-daemon service running, and I installed postmaster as a service > using the command: > > cygrunsrv --install PostgreSQL --path /bin/postmaster --args "-D > /usr/local/share/postdb" > --user Randy --dep ipc-daemon --termsig INT > > This service starts fine too... > > Then I tried to create a new database: createdb Randy. > createdb fails with the message: > > psql: server closed the connection unexpectedly > This probably means the server terminated abnormally > before or while processing the request. > createdb: database creation failed > > ...and the PostgreSQL service stops. > > I tried: psql template0 ...and got basically the same message, and the > service stopped again. > > So... Any ideas? Any at all would be greatly appreciated. > > Thanks, > Randy Widell > > > >
It gives me psql: could not connect to server: Connection refused Is the server running on host superfly and accepting TCP/IP connections on port 5432? if I use the --host option without using the -i option when starting postmaster. However, if I start postmaster with the -i option and use the --host option on psql, I get the same error message as stated before and the PostgreSQL service stops. "Michael Ben-David" <nospam_mikebd@iname.com_mapson> wrote in message news:a667fe$2fpp$1@jupiter.hub.org... > try adding the -h <hostname> argument to createdb and psql or set the PGHOST > environment variable. I don't think this was required with 7.1 but seems to > be with 7.2 > > "Randy Widell" <nospam_rwidell@bellsouth.net_mapson> wrote in message > news:ksrg8.43009$sH1.2880833@e3500-atl2.usenetserver.com... > > I am running (or attempting to run) PostgreSQL 7.2 under Cygwin > > under WindowsXP. I have the latest version of everything for Cygwin, I > have > > the ipc-daemon service running, and I installed postmaster as a service > > using the command: > > > > cygrunsrv --install PostgreSQL --path /bin/postmaster --args "-D > > /usr/local/share/postdb" > > --user Randy --dep ipc-daemon --termsig INT > > > > This service starts fine too... > > > > Then I tried to create a new database: createdb Randy. > > createdb fails with the message: > > > > psql: server closed the connection unexpectedly > > This probably means the server terminated abnormally > > before or while processing the request. > > createdb: database creation failed > > > > ...and the PostgreSQL service stops. > > > > I tried: psql template0 ...and got basically the same message, and the > > service stopped again. > > > > So... Any ideas? Any at all would be greatly appreciated. > > > > Thanks, > > Randy Widell > > > > > > > > > >